New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNMP Issues on recent version of PHP #3447
Comments
That would suggest you've put a non integer timeout against a device? |
This is all about tight type casting in more recent php's I think. Depending of API or CLI, we are either dividing by 1000 (CLI) or multiplying (API). Looks like in 7.2.x they are converting to a float when multiplying. Almost feels like a php but. |
SNMP Issues on recent versions of PHP
Please test on the latest version of lib/snmp.php in the 1.2.x branch. Closed is resolved. |
Thank you for your work. I applied a1eed00 to the
That's probably another issue. However, if I remove the error suppression (
This suggests the issue is not resolved, just silenced :/ My guess is that in So, my suggestion is to change the parentheses to By the way, with the On an unrelated note, it wouldn't hurt to issue a warning when Lines 127 to 129 in 9284bdd
|
Fantastic work. Feel free to create a pull request! |
Alright. Can you just confirm the units on the timeout variable, please? |
Or should I open another issue for that? |
php-snmp is microseconds, net-snmp-utils are seconds, and cacti store in milliseconds. |
@nuno-silva, how's that pull request coming along? |
Handling the casting correctly now.
@TheWitness Sorry, work got in the way, but I see you already fixed the parentheses. I will still try to look into this and I'll open a pull request if I do find that something needs be fixed:
This would be a new issue anyway; it's probably not related to a "recent version of PHP". |
I have no idea where you found that issue * whistles * |
Describe the bug
I have the following errors/warnings showing up on one of my SNMPv2 devices:
To Reproduce
Steps to reproduce the behaviour:
Expected behavior
Expected no warnings or errors.
Additional context
Using:
Affected lines:
cacti/lib/snmp.php
Lines 138 to 142 in 812bb8d
The text was updated successfully, but these errors were encountered: