Bug #64765 [Fbk->NoF]: Some IPv6 addresses get interpreted wrong
Edit report at https://bugs.php.net/bug.php?id=64765&edit=1 ID: 64765 Updated by: lytbo...@php.net Reported by:gmcgraw at udel dot edu Summary:Some IPv6 addresses get interpreted wrong -Status: Feedback +Status: No Feedback Type: Bug Package:SNMP related Operating System: Linux PHP Version:5.4.14 Assigned To:lytboris Block user comment: N Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: [2013-05-03 08:45:00] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2013-05-03 08:41:41] lytbo...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=3828f6227b188bd0c8d829a375ebf51faf67c448 Log: Fix bug #64765 (enclose IPv6 address into square brackets) [2013-05-02 22:46:10] gmcgraw at udel dot edu Description: PHP sends the following string to Net-SNMP to parse as an address: "udp6:fc00::23:250:56ff:fe82:3177" Net-SNMP understands the final part of the IP address to be a port number, since it has no hexadecimal characters in it. There was an earlier bug filed and fixed in PHP 5.4 that involved IPv6 but that fix only partially addressed the issue (bug #42918). It made PHP correctly parse IPv6 address but it didn't ensure that PHP sent Net-SNMP a form of address that it will always correctly interpret. My patch causes square brackets to always surround the IPv6 address, so that Net-SNMP cannot possibly interpret the last part of the Ipv6 address as a port number. The port number will be placed outside the square brackets. Here is an example of how it will now send the IPV6 address to Net-SNMP: "udp6:[fc00::23:250:56ff:fe82:3177]" Or if there is a custom port number 1234: "udp6:[fc00::23:250:56ff:fe82:3177]:1234" Net-SNMP will correctly parse that and use the default SNMP port number (161) if none is specified or the provided port number otherwise. I have reproduced this in 5.4.1 and 5.4.14. Test script: --- $s=new SNMP(SNMP::VERSION_2C, '[fc00::23:250:56ff:fe82:3177]', 'public'); print_r($s->get('.1.3.6.1.2.1.1.1.0')); Expected result: STRING: "Linux mykernel12345 #5 SMP Fri Jun 1 19:44:50 GMT 2012 x86_64" Actual result: -- Warning: SNMP::get(): No response from udp6:fc00::23:250:56ff:fe82:3177 in php shell code on line 1 -- Edit this bug report at https://bugs.php.net/bug.php?id=64765&edit=1
Bug #64159 [Fbk->NoF]: Truncated snmpget
Edit report at https://bugs.php.net/bug.php?id=64159&edit=1 ID: 64159 Updated by: lytbo...@php.net Reported by:loic dot blot at unix-experience dot fr Summary:Truncated snmpget -Status: Feedback +Status: No Feedback Type: Bug Package:SNMP related Operating System: * PHP Version:5.4.11 Assigned To:lytboris Block user comment: N Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: [2013-05-03 12:08:55] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2013-05-03 12:08:02] lytbo...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=2c336c9cde524cb6465bbd75924b7e40251aefab Log: Fixed bug #64159 (Truncated snmpget) [2013-05-03 12:08:00] lytbo...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=e36adfe94a663bc1eeb5d9d378dc80883de179db Log: Fixed bug #64159 (Truncated snmpget) [2013-05-03 09:35:46] lytbo...@php.net Basically this is because of loosy algorithm predicting string length produced by snmp library function that prints OID values. As a walkaround one can set === snmp_set_valueretrieval(SNMP_VALUE_PLAIN); === (or OO API [SNMP Object]->valueretrieval) and then use bin2hex to decode binary string into hex string. [2013-02-20 18:40:33] yordan dot yordanov at innologica dot com Happening to me aslo. Here's my reproduction: [root@monitor ~]# snmpwalk -cpublic -v1 192.168.0.232 -On .1.3.6.1.4.1.9.9.46.1.6.1.1.4.10003 .1.3.6.1.4.1.9.9.46.1.6.1.1.4.10003 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 [root@monitor ~]# php -r 'print_r(snmprealwalk("192.168.0.232","public",".1.3.6.1.4.1.9.9.46.1.6.1.1.4.10 003"));' Array ( [SNMPv2-SMI::enterprises.9.9.46.1.6.1.1.4.10003] => Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ) [root@monitor ~]# php -v PHP 5.4.11 (cli) (built: Jan 16 2013 16:51:38) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies [root@monitor ~]# uname -a Linux 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux [root@monitor ~]# cat /etc/centos-release CentOS release 6.3 (Final) The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=64159 -- Edit this bug report at https://bugs.php.net/bug.php?id=64159&edit=1
Bug #61981 [Fbk->NoF]: OO API, walk: $suffix_as_key is not working correctly
Edit report at https://bugs.php.net/bug.php?id=61981&edit=1 ID: 61981 Updated by: lytbo...@php.net Reported by:gubin dot gm at yandex dot ru Summary:OO API, walk: $suffix_as_key is not working correctly -Status: Feedback +Status: No Feedback Type: Bug Package:SNMP related Operating System: * PHP Version:5.4.3 Assigned To:lytboris Block user comment: N Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: [2013-03-17 16:58:15] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2013-03-17 16:53:58] lytbo...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=b32405053f5a32d8c4d83f7566f5b414afd3aedb Log: Fix bug #61981 [2013-03-17 16:53:57] lytbo...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=44197774c02506be626c85ec60889b58c6c0575e Log: Fixed bug #61981 [2012-05-09 11:10:56] gubin dot gm at yandex dot ru Description: Bag in method SNMP::walk. The parameter $suffix_as_key not working correctly. Test script: --- walk(".1.3.6.1.2.1.2.2.1.2", TRUE); print_r($ifDescr); ?> Expected result: Array ( [1001] => Port 1:1 [1002] => Port 1:2 [1003] => Port 1:3 ... ) Actual result: -- Array ( [1001] => Port 1:1 [iso.3.6.1.2.1.2.2.1.2.1002] => Port 1:2 [iso.3.6.1.2.1.2.2.1.2.1003] => Port 1:3 ... ) -- Edit this bug report at https://bugs.php.net/bug.php?id=61981&edit=1
Bug #60749 [NoF]: SNMP module should not strip non-standard SNMP port from hostname
Edit report at https://bugs.php.net/bug.php?id=60749&edit=1 ID: 60749 Updated by: lytbo...@php.net Reported by:lytbo...@php.net Summary:SNMP module should not strip non-standard SNMP port from hostname Status: No Feedback Type: Bug Package:SNMP related Operating System: * PHP Version:5.4.0RC5 Assigned To:lytboris Block user comment: N Private report: N New Comment: You need patch from bug report #64124, not this one. Previous Comments: [2013-09-11 17:32:08] hexetic at gmail dot com The fix checked-in seems to break passing-in "hostname:port" as $hostname to the snmp functions, e.g.: After the call to snmp2_get, $host is "192.168.0.1001616" -- i.e., the colon has been removed. As a result, calling snmp2_get or any of the other functional snmp parameters is likely to fail after the first time. We are experiencing this with the current version of PHP in Debian Squeeze, i.e.: $ php --version PHP 5.4.4-14+deb7u4 (cli) (built: Aug 23 2013 14:37:41) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies The codebase for this version appears to have lytbo...@php.net's patch. [2013-02-08 05:10:19] lytbo...@php.net No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. [2012-07-24 23:37:45] ras...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=583292ab221e98f1e9585412c515057626bccdd4 Log: Fixed bug #60585 (php build fails with USE flag snmp when IPv6 support is disabled) Fixed bug #60749 (SNMP module should not strip non-standard SNMP port from hostname) Fixed ipv6 test skipto if IPv6 support is disabled [2012-04-18 09:46:36] larue...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=583292ab221e98f1e9585412c515057626bccdd4 Log: Fixed bug #60585 (php build fails with USE flag snmp when IPv6 support is disabled) Fixed bug #60749 (SNMP module should not strip non-standard SNMP port from hostname) Fixed ipv6 test skipto if IPv6 support is disabled [2012-01-13 18:48:17] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=60749 -- Edit this bug report at https://bugs.php.net/bug.php?id=60749&edit=1
Bug #65422 [Asn->Nab]: Error when calling multiple snmp3 functions
Edit report at https://bugs.php.net/bug.php?id=65422&edit=1 ID: 65422 Updated by: lytbo...@php.net Reported by:pkryon at yahoo dot com Summary:Error when calling multiple snmp3 functions -Status: Assigned +Status: Not a bug Type: Bug Package:SNMP related Operating System: Debian Wheezy PHP Version:5.5.1 Assigned To:lytboris Block user comment: N Private report: N New Comment: >Not sure where to go from there... use tcpdump to dig further. I will close the ticket. Previous Comments: [2013-08-30 20:00:51] pkryon at yahoo dot com Well, hm. This got me thinking that all of the devices I've been testing have been Cisco WS-C4510R+E switches with 7-E supervisor engines. So I tried the same thing on some older WS-C4506 switches with Sup II+ engines and it works just fine. Not sure where to go from there... I don't currently have the php-snmp source but could probably get that setup if it would still help. [2013-08-30 17:30:42] lytbo...@php.net I have re-checked my configuration and stiil unable to reproduce it: == == Works fine for me. Do you have a possibility to run tests bundled with php-snmp source? [2013-08-30 17:19:05] lytbo...@php.net Forget previous comment :) [2013-08-30 17:11:01] lytbo...@php.net Please note that you have 'sha' written in low case chars. Try replacing them to SHA (the same way you use in snmpget). [2013-08-30 15:48:59] pkryon at yahoo dot com Reopen The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=65422 -- Edit this bug report at https://bugs.php.net/bug.php?id=65422&edit=1
Bug #65422 [Fbk]: Error when calling multiple snmp3 functions
Edit report at https://bugs.php.net/bug.php?id=65422&edit=1 ID: 65422 Updated by: lytbo...@php.net Reported by:pkryon at yahoo dot com Summary:Error when calling multiple snmp3 functions Status: Feedback Type: Bug Package:SNMP related Operating System: Debian Wheezy PHP Version:5.5.1 Assigned To:lytboris Block user comment: N Private report: N New Comment: Forget previous comment :) Previous Comments: [2013-08-30 17:11:01] lytbo...@php.net Please note that you have 'sha' written in low case chars. Try replacing them to SHA (the same way you use in snmpget). [2013-08-30 15:48:59] pkryon at yahoo dot com Reopen [2013-08-30 15:31:04] pkryon at yahoo dot com Were you by chance polling a single host multiple time to test? Because that seems to work. More tests below... bugtest1.php: Result: [REMOVED]:/var/www/scripts$ php bugtest1.php STRING: EOC Building 1 (Room 1260) PHP Warning: snmp3_get(): No response from 172.19.12.12 in /var/www/scripts/bugtest1.php on line 8 PHP Warning: snmp3_get(): No response from 172.19.12.21 in /var/www/scripts/bugtest1.php on line 10 bugtest2.php: Result: [REMOVED]:/var/www/scripts$ php bugtest2.php STRING: EOC Building 1 (Room 1260) STRING: EOC Building 1 (Room 1260) STRING: EOC Building 1 (Room 1260) bugtest3.php: Result: [REMOVED]:/var/www/scripts$ php bugtest3.php STRING: EOC Building 1 (Room 1260) STRING: EOC Building 1 (Room 1264) STRING: EOC Building 2 (Room 2260) bugtest4.php: Result: [REMOVED]:/var/www/scripts$ php bugtest4.php STRING: EOC Building 1 (Room 1260) STRING: EOC Building 1 (Room 1264) STRING: EOC Building 2 (Room 2260) [2013-08-30 06:09:25] lytbo...@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. I can not reproduce this bug in my test environment. Please post Net-SNMP snmpget commands with their results prooving that your 2nd & 3rd hosts are configured to work with SNMPv3 the same way that your 1st host. [2013-08-08 20:42:55] pkryon at yahoo dot com Description: Test script below returns only the first snmp3_get. The next two fail with a PHP Warning. This appears to be a problem in all snmp3 functions but seems to work as expected with the snmp/snmp2 functions. Test script: --- Expected result: STRING: Location 1 STRING: Location 2 STRING: Location 3 Actual result: -- STRING: Location 1 PHP Warning: snmp3_get(): No response from 192.168.0.2 in /var/www/test4.php on line 5 PHP Warning: snmp3_get(): No response from 192.168.0.3 in /var/www/test4.php on line 7 -- Edit this bug report at https://bugs.php.net/bug.php?id=65422&edit=1
Bug #65422 [Fbk]: Error when calling multiple snmp3 functions
Edit report at https://bugs.php.net/bug.php?id=65422&edit=1 ID: 65422 Updated by: lytbo...@php.net Reported by:pkryon at yahoo dot com Summary:Error when calling multiple snmp3 functions Status: Feedback Type: Bug Package:SNMP related Operating System: Debian Wheezy PHP Version:5.5.1 Assigned To:lytboris Block user comment: N Private report: N New Comment: Please note that you have 'sha' written in low case chars. Try replacing them to SHA (the same way you use in snmpget). Previous Comments: [2013-08-30 15:48:59] pkryon at yahoo dot com Reopen [2013-08-30 15:31:04] pkryon at yahoo dot com Were you by chance polling a single host multiple time to test? Because that seems to work. More tests below... bugtest1.php: Result: [REMOVED]:/var/www/scripts$ php bugtest1.php STRING: EOC Building 1 (Room 1260) PHP Warning: snmp3_get(): No response from 172.19.12.12 in /var/www/scripts/bugtest1.php on line 8 PHP Warning: snmp3_get(): No response from 172.19.12.21 in /var/www/scripts/bugtest1.php on line 10 bugtest2.php: Result: [REMOVED]:/var/www/scripts$ php bugtest2.php STRING: EOC Building 1 (Room 1260) STRING: EOC Building 1 (Room 1260) STRING: EOC Building 1 (Room 1260) bugtest3.php: Result: [REMOVED]:/var/www/scripts$ php bugtest3.php STRING: EOC Building 1 (Room 1260) STRING: EOC Building 1 (Room 1264) STRING: EOC Building 2 (Room 2260) bugtest4.php: Result: [REMOVED]:/var/www/scripts$ php bugtest4.php STRING: EOC Building 1 (Room 1260) STRING: EOC Building 1 (Room 1264) STRING: EOC Building 2 (Room 2260) [2013-08-30 06:09:25] lytbo...@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. I can not reproduce this bug in my test environment. Please post Net-SNMP snmpget commands with their results prooving that your 2nd & 3rd hosts are configured to work with SNMPv3 the same way that your 1st host. [2013-08-08 20:42:55] pkryon at yahoo dot com Description: Test script below returns only the first snmp3_get. The next two fail with a PHP Warning. This appears to be a problem in all snmp3 functions but seems to work as expected with the snmp/snmp2 functions. Test script: --- Expected result: STRING: Location 1 STRING: Location 2 STRING: Location 3 Actual result: -- STRING: Location 1 PHP Warning: snmp3_get(): No response from 192.168.0.2 in /var/www/test4.php on line 5 PHP Warning: snmp3_get(): No response from 192.168.0.3 in /var/www/test4.php on line 7 -- Edit this bug report at https://bugs.php.net/bug.php?id=65422&edit=1
Bug #65422 [Fbk]: Error when calling multiple snmp3 functions
Edit report at https://bugs.php.net/bug.php?id=65422&edit=1 ID: 65422 Updated by: lytbo...@php.net Reported by:pkryon at yahoo dot com Summary:Error when calling multiple snmp3 functions Status: Feedback Type: Bug Package:SNMP related Operating System: Debian Wheezy PHP Version:5.5.1 Assigned To:lytboris Block user comment: N Private report: N New Comment: I have re-checked my configuration and stiil unable to reproduce it: == == Works fine for me. Do you have a possibility to run tests bundled with php-snmp source? Previous Comments: [2013-08-30 17:19:05] lytbo...@php.net Forget previous comment :) [2013-08-30 17:11:01] lytbo...@php.net Please note that you have 'sha' written in low case chars. Try replacing them to SHA (the same way you use in snmpget). [2013-08-30 15:48:59] pkryon at yahoo dot com Reopen [2013-08-30 15:31:04] pkryon at yahoo dot com Were you by chance polling a single host multiple time to test? Because that seems to work. More tests below... bugtest1.php: Result: [REMOVED]:/var/www/scripts$ php bugtest1.php STRING: EOC Building 1 (Room 1260) PHP Warning: snmp3_get(): No response from 172.19.12.12 in /var/www/scripts/bugtest1.php on line 8 PHP Warning: snmp3_get(): No response from 172.19.12.21 in /var/www/scripts/bugtest1.php on line 10 bugtest2.php: Result: [REMOVED]:/var/www/scripts$ php bugtest2.php STRING: EOC Building 1 (Room 1260) STRING: EOC Building 1 (Room 1260) STRING: EOC Building 1 (Room 1260) bugtest3.php: Result: [REMOVED]:/var/www/scripts$ php bugtest3.php STRING: EOC Building 1 (Room 1260) STRING: EOC Building 1 (Room 1264) STRING: EOC Building 2 (Room 2260) bugtest4.php: Result: [REMOVED]:/var/www/scripts$ php bugtest4.php STRING: EOC Building 1 (Room 1260) STRING: EOC Building 1 (Room 1264) STRING: EOC Building 2 (Room 2260) [2013-08-30 06:09:25] lytbo...@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. I can not reproduce this bug in my test environment. Please post Net-SNMP snmpget commands with their results prooving that your 2nd & 3rd hosts are configured to work with SNMPv3 the same way that your 1st host. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=65422 -- Edit this bug report at https://bugs.php.net/bug.php?id=65422&edit=1
Bug #65422 [Opn->Fbk]: Error when calling multiple snmp3 functions
Edit report at https://bugs.php.net/bug.php?id=65422&edit=1 ID: 65422 Updated by: lytbo...@php.net Reported by:pkryon at yahoo dot com Summary:Error when calling multiple snmp3 functions -Status: Open +Status: Feedback Type: Bug Package:SNMP related Operating System: Debian Wheezy PHP Version:5.5.1 Assigned To:lytboris Block user comment: N Private report: N Previous Comments: [2013-08-30 15:48:59] pkryon at yahoo dot com Reopen [2013-08-30 15:31:04] pkryon at yahoo dot com Were you by chance polling a single host multiple time to test? Because that seems to work. More tests below... bugtest1.php: Result: [REMOVED]:/var/www/scripts$ php bugtest1.php STRING: EOC Building 1 (Room 1260) PHP Warning: snmp3_get(): No response from 172.19.12.12 in /var/www/scripts/bugtest1.php on line 8 PHP Warning: snmp3_get(): No response from 172.19.12.21 in /var/www/scripts/bugtest1.php on line 10 bugtest2.php: Result: [REMOVED]:/var/www/scripts$ php bugtest2.php STRING: EOC Building 1 (Room 1260) STRING: EOC Building 1 (Room 1260) STRING: EOC Building 1 (Room 1260) bugtest3.php: Result: [REMOVED]:/var/www/scripts$ php bugtest3.php STRING: EOC Building 1 (Room 1260) STRING: EOC Building 1 (Room 1264) STRING: EOC Building 2 (Room 2260) bugtest4.php: Result: [REMOVED]:/var/www/scripts$ php bugtest4.php STRING: EOC Building 1 (Room 1260) STRING: EOC Building 1 (Room 1264) STRING: EOC Building 2 (Room 2260) [2013-08-30 06:09:25] lytbo...@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. I can not reproduce this bug in my test environment. Please post Net-SNMP snmpget commands with their results prooving that your 2nd & 3rd hosts are configured to work with SNMPv3 the same way that your 1st host. [2013-08-08 20:42:55] pkryon at yahoo dot com Description: Test script below returns only the first snmp3_get. The next two fail with a PHP Warning. This appears to be a problem in all snmp3 functions but seems to work as expected with the snmp/snmp2 functions. Test script: --- Expected result: STRING: Location 1 STRING: Location 2 STRING: Location 3 Actual result: -- STRING: Location 1 PHP Warning: snmp3_get(): No response from 192.168.0.2 in /var/www/test4.php on line 5 PHP Warning: snmp3_get(): No response from 192.168.0.3 in /var/www/test4.php on line 7 -- Edit this bug report at https://bugs.php.net/bug.php?id=65422&edit=1
Bug #65422 [Opn->Fbk]: Error when calling multiple snmp3 functions
Edit report at https://bugs.php.net/bug.php?id=65422&edit=1 ID: 65422 Updated by: lytbo...@php.net Reported by:pkryon at yahoo dot com Summary:Error when calling multiple snmp3 functions -Status: Open +Status: Feedback Type: Bug Package:SNMP related Operating System: Debian Wheezy PHP Version:5.5.1 -Assigned To: +Assigned To:lytboris Block user comment: N Private report: N New Comment: Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. I can not reproduce this bug in my test environment. Please post Net-SNMP snmpget commands with their results prooving that your 2nd & 3rd hosts are configured to work with SNMPv3 the same way that your 1st host. Previous Comments: [2013-08-08 20:42:55] pkryon at yahoo dot com Description: Test script below returns only the first snmp3_get. The next two fail with a PHP Warning. This appears to be a problem in all snmp3 functions but seems to work as expected with the snmp/snmp2 functions. Test script: --- Expected result: STRING: Location 1 STRING: Location 2 STRING: Location 3 Actual result: -- STRING: Location 1 PHP Warning: snmp3_get(): No response from 192.168.0.2 in /var/www/test4.php on line 5 PHP Warning: snmp3_get(): No response from 192.168.0.3 in /var/www/test4.php on line 7 -- Edit this bug report at https://bugs.php.net/bug.php?id=65422&edit=1
Bug #64159 [Csd->Fbk]: Truncated snmpget
Edit report at https://bugs.php.net/bug.php?id=64159&edit=1 ID: 64159 Updated by: lytbo...@php.net Reported by:loic dot blot at unix-experience dot fr Summary:Truncated snmpget -Status: Closed +Status: Feedback Type: Bug Package:SNMP related Operating System: * PHP Version:5.4.11 Assigned To:lytboris Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2013-05-03 12:08:02] lytbo...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=2c336c9cde524cb6465bbd75924b7e40251aefab Log: Fixed bug #64159 (Truncated snmpget) [2013-05-03 12:08:00] lytbo...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=e36adfe94a663bc1eeb5d9d378dc80883de179db Log: Fixed bug #64159 (Truncated snmpget) [2013-05-03 09:35:46] lytbo...@php.net Basically this is because of loosy algorithm predicting string length produced by snmp library function that prints OID values. As a walkaround one can set === snmp_set_valueretrieval(SNMP_VALUE_PLAIN); === (or OO API [SNMP Object]->valueretrieval) and then use bin2hex to decode binary string into hex string. [2013-02-20 18:40:33] yordan dot yordanov at innologica dot com Happening to me aslo. Here's my reproduction: [root@monitor ~]# snmpwalk -cpublic -v1 192.168.0.232 -On .1.3.6.1.4.1.9.9.46.1.6.1.1.4.10003 .1.3.6.1.4.1.9.9.46.1.6.1.1.4.10003 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 [root@monitor ~]# php -r 'print_r(snmprealwalk("192.168.0.232","public",".1.3.6.1.4.1.9.9.46.1.6.1.1.4.10 003"));' Array ( [SNMPv2-SMI::enterprises.9.9.46.1.6.1.1.4.10003] => Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ) [root@monitor ~]# php -v PHP 5.4.11 (cli) (built: Jan 16 2013 16:51:38) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies [root@monitor ~]# uname -a Linux 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux [root@monitor ~]# cat /etc/centos-release CentOS release 6.3 (Final) [2013-02-06 22:00:27] loic dot blot at unix-experience dot fr do this on a CISCO 2950, 2960, 3750 or 4500 (that's all devices i have tested) with proper community and ip. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=64159 -- Edit this bug report at https://bugs.php.net/bug.php?id=64159&edit=1
Bug #64159 [Asn->Csd]: Truncated snmpget
Edit report at https://bugs.php.net/bug.php?id=64159&edit=1 ID: 64159 Updated by: lytbo...@php.net Reported by:loic dot blot at unix-experience dot fr Summary:Truncated snmpget -Status: Assigned +Status: Closed Type: Bug Package:SNMP related Operating System: * PHP Version:5.4.11 Assigned To:lytboris Block user comment: N Private report: N New Comment: Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=e36adfe94a663bc1eeb5d9d378dc80883de179db Log: Fixed bug #64159 (Truncated snmpget) Previous Comments: [2013-05-03 09:35:46] lytbo...@php.net Basically this is because of loosy algorithm predicting string length produced by snmp library function that prints OID values. As a walkaround one can set === snmp_set_valueretrieval(SNMP_VALUE_PLAIN); === (or OO API [SNMP Object]->valueretrieval) and then use bin2hex to decode binary string into hex string. [2013-02-20 18:40:33] yordan dot yordanov at innologica dot com Happening to me aslo. Here's my reproduction: [root@monitor ~]# snmpwalk -cpublic -v1 192.168.0.232 -On .1.3.6.1.4.1.9.9.46.1.6.1.1.4.10003 .1.3.6.1.4.1.9.9.46.1.6.1.1.4.10003 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 [root@monitor ~]# php -r 'print_r(snmprealwalk("192.168.0.232","public",".1.3.6.1.4.1.9.9.46.1.6.1.1.4.10 003"));' Array ( [SNMPv2-SMI::enterprises.9.9.46.1.6.1.1.4.10003] => Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ) [root@monitor ~]# php -v PHP 5.4.11 (cli) (built: Jan 16 2013 16:51:38) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies [root@monitor ~]# uname -a Linux 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux [root@monitor ~]# cat /etc/centos-release CentOS release 6.3 (Final) [2013-02-06 22:00:27] loic dot blot at unix-experience dot fr do this on a CISCO 2950, 2960, 3750 or 4500 (that's all devices i have tested) with proper community and ip. [2013-02-06 21:54:24] johan...@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with , is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. [2013-02-05 16:18:46] loic dot blot at unix-experience dot fr Description: Hello, Since php 5.4.11 i get a problem on snmpget function. I haven't the problem with system snmpget command. large responses for snmpget are truncated. I think there is a buffer problem. Expected result: but instead i get: 7F FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF Actual result: -- For example, snmpget (on CISCO switches), really returns: 7F FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF -- Edit this bug report at https://bugs.php.net/bug.php?id=64159&edit=1
Bug #64159 [Opn]: Truncated snmpget
Edit report at https://bugs.php.net/bug.php?id=64159&edit=1 ID: 64159 Updated by: lytbo...@php.net Reported by:loic dot blot at unix-experience dot fr Summary:Truncated snmpget Status: Open Type: Bug Package:SNMP related -Operating System: FreeBSD 9.1 +Operating System: * PHP Version:5.4.11 Block user comment: N Private report: N New Comment: Basically this is because of loosy algorithm predicting string length produced by snmp library function that prints OID values. As a walkaround one can set === snmp_set_valueretrieval(SNMP_VALUE_PLAIN); === (or OO API [SNMP Object]->valueretrieval) and then use bin2hex to decode binary string into hex string. Previous Comments: [2013-02-20 18:40:33] yordan dot yordanov at innologica dot com Happening to me aslo. Here's my reproduction: [root@monitor ~]# snmpwalk -cpublic -v1 192.168.0.232 -On .1.3.6.1.4.1.9.9.46.1.6.1.1.4.10003 .1.3.6.1.4.1.9.9.46.1.6.1.1.4.10003 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 [root@monitor ~]# php -r 'print_r(snmprealwalk("192.168.0.232","public",".1.3.6.1.4.1.9.9.46.1.6.1.1.4.10 003"));' Array ( [SNMPv2-SMI::enterprises.9.9.46.1.6.1.1.4.10003] => Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ) [root@monitor ~]# php -v PHP 5.4.11 (cli) (built: Jan 16 2013 16:51:38) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies [root@monitor ~]# uname -a Linux 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux [root@monitor ~]# cat /etc/centos-release CentOS release 6.3 (Final) [2013-02-06 22:00:27] loic dot blot at unix-experience dot fr do this on a CISCO 2950, 2960, 3750 or 4500 (that's all devices i have tested) with proper community and ip. [2013-02-06 21:54:24] johan...@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with , is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. [2013-02-05 16:18:46] loic dot blot at unix-experience dot fr Description: Hello, Since php 5.4.11 i get a problem on snmpget function. I haven't the problem with system snmpget command. large responses for snmpget are truncated. I think there is a buffer problem. Expected result: but instead i get: 7F FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF Actual result: -- For example, snmpget (on CISCO switches), really returns: 7F FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF -- Edit this bug report at https://bugs.php.net/bug.php?id=64159&edit=1
Bug #64765 [Csd->Fbk]: Some IPv6 addresses get interpreted wrong
Edit report at https://bugs.php.net/bug.php?id=64765&edit=1 ID: 64765 Updated by: lytbo...@php.net Reported by:gmcgraw at udel dot edu Summary:Some IPv6 addresses get interpreted wrong -Status: Closed +Status: Feedback Type: Bug Package:SNMP related Operating System: Linux PHP Version:5.4.14 Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2013-05-03 08:41:41] lytbo...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=3828f6227b188bd0c8d829a375ebf51faf67c448 Log: Fix bug #64765 (enclose IPv6 address into square brackets) [2013-05-02 22:46:10] gmcgraw at udel dot edu Description: PHP sends the following string to Net-SNMP to parse as an address: "udp6:fc00::23:250:56ff:fe82:3177" Net-SNMP understands the final part of the IP address to be a port number, since it has no hexadecimal characters in it. There was an earlier bug filed and fixed in PHP 5.4 that involved IPv6 but that fix only partially addressed the issue (bug #42918). It made PHP correctly parse IPv6 address but it didn't ensure that PHP sent Net-SNMP a form of address that it will always correctly interpret. My patch causes square brackets to always surround the IPv6 address, so that Net-SNMP cannot possibly interpret the last part of the Ipv6 address as a port number. The port number will be placed outside the square brackets. Here is an example of how it will now send the IPV6 address to Net-SNMP: "udp6:[fc00::23:250:56ff:fe82:3177]" Or if there is a custom port number 1234: "udp6:[fc00::23:250:56ff:fe82:3177]:1234" Net-SNMP will correctly parse that and use the default SNMP port number (161) if none is specified or the provided port number otherwise. I have reproduced this in 5.4.1 and 5.4.14. Test script: --- $s=new SNMP(SNMP::VERSION_2C, '[fc00::23:250:56ff:fe82:3177]', 'public'); print_r($s->get('.1.3.6.1.2.1.1.1.0')); Expected result: STRING: "Linux mykernel12345 #5 SMP Fri Jun 1 19:44:50 GMT 2012 x86_64" Actual result: -- Warning: SNMP::get(): No response from udp6:fc00::23:250:56ff:fe82:3177 in php shell code on line 1 -- Edit this bug report at https://bugs.php.net/bug.php?id=64765&edit=1
Bug #64765 [Opn->Csd]: Some IPv6 addresses get interpreted wrong
Edit report at https://bugs.php.net/bug.php?id=64765&edit=1 ID: 64765 Updated by: lytbo...@php.net Reported by:gmcgraw at udel dot edu Summary:Some IPv6 addresses get interpreted wrong -Status: Open +Status: Closed Type: Bug Package:SNMP related Operating System: Linux PHP Version:5.4.14 Block user comment: N Private report: N New Comment: Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=3828f6227b188bd0c8d829a375ebf51faf67c448 Log: Fix bug #64765 (enclose IPv6 address into square brackets) Previous Comments: [2013-05-02 22:46:10] gmcgraw at udel dot edu Description: PHP sends the following string to Net-SNMP to parse as an address: "udp6:fc00::23:250:56ff:fe82:3177" Net-SNMP understands the final part of the IP address to be a port number, since it has no hexadecimal characters in it. There was an earlier bug filed and fixed in PHP 5.4 that involved IPv6 but that fix only partially addressed the issue (bug #42918). It made PHP correctly parse IPv6 address but it didn't ensure that PHP sent Net-SNMP a form of address that it will always correctly interpret. My patch causes square brackets to always surround the IPv6 address, so that Net-SNMP cannot possibly interpret the last part of the Ipv6 address as a port number. The port number will be placed outside the square brackets. Here is an example of how it will now send the IPV6 address to Net-SNMP: "udp6:[fc00::23:250:56ff:fe82:3177]" Or if there is a custom port number 1234: "udp6:[fc00::23:250:56ff:fe82:3177]:1234" Net-SNMP will correctly parse that and use the default SNMP port number (161) if none is specified or the provided port number otherwise. I have reproduced this in 5.4.1 and 5.4.14. Test script: --- $s=new SNMP(SNMP::VERSION_2C, '[fc00::23:250:56ff:fe82:3177]', 'public'); print_r($s->get('.1.3.6.1.2.1.1.1.0')); Expected result: STRING: "Linux mykernel12345 #5 SMP Fri Jun 1 19:44:50 GMT 2012 x86_64" Actual result: -- Warning: SNMP::get(): No response from udp6:fc00::23:250:56ff:fe82:3177 in php shell code on line 1 -- Edit this bug report at https://bugs.php.net/bug.php?id=64765&edit=1
Bug #61981 [Csd->Fbk]: OO API, walk: $suffix_as_key is not working correctly
Edit report at https://bugs.php.net/bug.php?id=61981&edit=1 ID: 61981 Updated by: lytbo...@php.net Reported by:gubin dot gm at yandex dot ru Summary:OO API, walk: $suffix_as_key is not working correctly -Status: Closed +Status: Feedback Type: Bug Package:SNMP related Operating System: * PHP Version:5.4.3 Assigned To:lytboris Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2013-03-17 16:53:58] lytbo...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=b32405053f5a32d8c4d83f7566f5b414afd3aedb Log: Fix bug #61981 [2013-03-17 16:53:57] lytbo...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=44197774c02506be626c85ec60889b58c6c0575e Log: Fixed bug #61981 [2012-05-09 11:10:56] gubin dot gm at yandex dot ru Description: Bag in method SNMP::walk. The parameter $suffix_as_key not working correctly. Test script: --- walk(".1.3.6.1.2.1.2.2.1.2", TRUE); print_r($ifDescr); ?> Expected result: Array ( [1001] => Port 1:1 [1002] => Port 1:2 [1003] => Port 1:3 ... ) Actual result: -- Array ( [1001] => Port 1:1 [iso.3.6.1.2.1.2.2.1.2.1002] => Port 1:2 [iso.3.6.1.2.1.2.2.1.2.1003] => Port 1:3 ... ) -- Edit this bug report at https://bugs.php.net/bug.php?id=61981&edit=1
Bug #61981 [Asn->Csd]: OO API, walk: $suffix_as_key is not working correctly
Edit report at https://bugs.php.net/bug.php?id=61981&edit=1 ID: 61981 Updated by: lytbo...@php.net Reported by:gubin dot gm at yandex dot ru Summary:OO API, walk: $suffix_as_key is not working correctly -Status: Assigned +Status: Closed Type: Bug Package:SNMP related Operating System: * PHP Version:5.4.3 Assigned To:lytboris Block user comment: N Private report: N New Comment: Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=44197774c02506be626c85ec60889b58c6c0575e Log: Fixed bug #61981 Previous Comments: [2012-05-09 11:10:56] gubin dot gm at yandex dot ru Description: Bag in method SNMP::walk. The parameter $suffix_as_key not working correctly. Test script: --- walk(".1.3.6.1.2.1.2.2.1.2", TRUE); print_r($ifDescr); ?> Expected result: Array ( [1001] => Port 1:1 [1002] => Port 1:2 [1003] => Port 1:3 ... ) Actual result: -- Array ( [1001] => Port 1:1 [iso.3.6.1.2.1.2.2.1.2.1002] => Port 1:2 [iso.3.6.1.2.1.2.2.1.2.1003] => Port 1:3 ... ) -- Edit this bug report at https://bugs.php.net/bug.php?id=61981&edit=1
Bug #61981 [Opn->Asn]: php5-snmp 5.4.0-3
Edit report at https://bugs.php.net/bug.php?id=61981&edit=1 ID: 61981 Updated by: lytbo...@php.net Reported by:gubin dot gm at yandex dot ru Summary:php5-snmp 5.4.0-3 -Status: Open +Status: Assigned Type: Bug Package:SNMP related Operating System: Debian 6.0 PHP Version:5.4.3 -Assigned To: +Assigned To:lytboris Block user comment: N Private report: N Previous Comments: [2012-05-09 11:10:56] gubin dot gm at yandex dot ru Description: Bag in method SNMP::walk. The parameter $suffix_as_key not working correctly. Test script: --- walk(".1.3.6.1.2.1.2.2.1.2", TRUE); print_r($ifDescr); ?> Expected result: Array ( [1001] => Port 1:1 [1002] => Port 1:2 [1003] => Port 1:3 ... ) Actual result: -- Array ( [1001] => Port 1:1 [iso.3.6.1.2.1.2.2.1.2.1002] => Port 1:2 [iso.3.6.1.2.1.2.2.1.2.1003] => Port 1:3 ... ) -- Edit this bug report at https://bugs.php.net/bug.php?id=61981&edit=1
Bug #64124 [Asn->Csd]: IPv6 malformed
Edit report at https://bugs.php.net/bug.php?id=64124&edit=1 ID: 64124 Updated by: lytbo...@php.net Reported by:andy at root dot lu Summary:IPv6 malformed -Status: Assigned +Status: Closed Type: Bug Package:SNMP related Operating System: * PHP Version:5.4.* Assigned To:lytboris Block user comment: N Private report: N New Comment: The fix for this bug has been committed. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: [2013-02-13 21:56:38] andy at root dot lu I confirm that there is no more issue with the latest version of php. In my case: php5.4-201302132030 Thank you! [2013-02-07 17:51:05] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2013-02-07 17:43:56] lytbo...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=ed6763420c10c5eb47d6db675322ecaa6de079b6 Log: fix bug #64124 (IPv6 malformed) [2013-02-07 17:42:17] lytbo...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=ed6763420c10c5eb47d6db675322ecaa6de079b6 Log: fix bug #64124 (IPv6 malformed) [2013-02-07 17:36:34] lytbo...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=ed6763420c10c5eb47d6db675322ecaa6de079b6 Log: fix bug #64124 (IPv6 malformed) The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=64124 -- Edit this bug report at https://bugs.php.net/bug.php?id=64124&edit=1
Bug #60585 [Fbk->NoF]: php build fails with USE flag snmp when IPv6 support is disabled
Edit report at https://bugs.php.net/bug.php?id=60585&edit=1 ID: 60585 Updated by: lytbo...@php.net Reported by:sknizek at cyberport dot de Summary:php build fails with USE flag snmp when IPv6 support is disabled -Status: Feedback +Status: No Feedback Type: Bug Package:SNMP related Operating System: Gentoo Linux PHP Version:5.4.0RC3 Assigned To:lytboris Block user comment: N Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: [2012-07-24 23:37:44] ras...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=583292ab221e98f1e9585412c515057626bccdd4 Log: Fixed bug #60585 (php build fails with USE flag snmp when IPv6 support is disabled) Fixed bug #60749 (SNMP module should not strip non-standard SNMP port from hostname) Fixed ipv6 test skipto if IPv6 support is disabled [2012-04-18 09:46:35] larue...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=583292ab221e98f1e9585412c515057626bccdd4 Log: Fixed bug #60585 (php build fails with USE flag snmp when IPv6 support is disabled) Fixed bug #60749 (SNMP module should not strip non-standard SNMP port from hostname) Fixed ipv6 test skipto if IPv6 support is disabled [2012-01-13 18:48:36] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2012-01-13 18:46:26] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=322214 Log: merge from trunk: Fixed bug #60585 (php build fails with USE flag snmp when IPv6 support is disabled Fixed bug #60749 (SNMP module should not strip non-standard SNMP port from hostname [2012-01-13 18:33:51] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=322213 Log: Fixed bug #60585 (php build fails with USE flag snmp when IPv6 support is disabled) Fixed bug #60749 (SNMP module should not strip non-standard SNMP port from hostname) Fixed ipv6 test skipto if IPv6 support is disabled The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=60585 -- Edit this bug report at https://bugs.php.net/bug.php?id=60585&edit=1
Bug #60749 [Fbk->NoF]: SNMP module should not strip non-standard SNMP port from hostname
Edit report at https://bugs.php.net/bug.php?id=60749&edit=1 ID: 60749 Updated by: lytbo...@php.net Reported by:lytbo...@php.net Summary:SNMP module should not strip non-standard SNMP port from hostname -Status: Feedback +Status: No Feedback Type: Bug Package:SNMP related Operating System: * PHP Version:5.4.0RC5 Assigned To:lytboris Block user comment: N Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: [2012-07-24 23:37:45] ras...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=583292ab221e98f1e9585412c515057626bccdd4 Log: Fixed bug #60585 (php build fails with USE flag snmp when IPv6 support is disabled) Fixed bug #60749 (SNMP module should not strip non-standard SNMP port from hostname) Fixed ipv6 test skipto if IPv6 support is disabled [2012-04-18 09:46:36] larue...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=583292ab221e98f1e9585412c515057626bccdd4 Log: Fixed bug #60585 (php build fails with USE flag snmp when IPv6 support is disabled) Fixed bug #60749 (SNMP module should not strip non-standard SNMP port from hostname) Fixed ipv6 test skipto if IPv6 support is disabled [2012-01-13 18:48:17] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2012-01-13 18:46:27] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=322214 Log: merge from trunk: Fixed bug #60585 (php build fails with USE flag snmp when IPv6 support is disabled Fixed bug #60749 (SNMP module should not strip non-standard SNMP port from hostname [2012-01-13 18:33:52] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=322213 Log: Fixed bug #60585 (php build fails with USE flag snmp when IPv6 support is disabled) Fixed bug #60749 (SNMP module should not strip non-standard SNMP port from hostname) Fixed ipv6 test skipto if IPv6 support is disabled The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=60749 -- Edit this bug report at https://bugs.php.net/bug.php?id=60749&edit=1
Req #35855 [Fbk->NoF]: Patch to Build PHP_SNMP with NET-SNMP Support
Edit report at https://bugs.php.net/bug.php?id=35855&edit=1 ID: 35855 Updated by: lytbo...@php.net Reported by:larryjadams at comcast dot net Summary:Patch to Build PHP_SNMP with NET-SNMP Support -Status: Feedback +Status: No Feedback Type: Feature/Change Request Package:SNMP related Operating System: Win32 PHP Version:5.1.1 Assigned To:lytboris Block user comment: N Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: [2011-08-21 20:24:02] lytbo...@php.net Is this still an pressing issue? [2005-12-31 09:11:59] larryjadams at comcast dot net Here are the two patch files: http://home.comcast.net/~larryjadams/config.w32.patch http://home.comcast.net/~larryjadams/snmp.dsp.patch Thanks!! [2005-12-30 22:36:55] larryjadams at comcast dot net Patch for snmp.dsp: --- snmp.dsp2005-12-27 17:21:19.31250 -0500 +++ Backup/snmp.dsp 2004-01-17 07:59:48.0 -0500 @@ -54,7 +54,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib libsnmp.lib netsnmp.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_snmp.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib libsnmp.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_snmp.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" !ELSEIF "$(CFG)" == "snmp - Win32 Debug_TS" @@ -81,7 +81,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts_debug.lib libsnmp.lib netsnmp.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Debug_TS/php_snmp.dll" /libpath:"..\..\Debug_TS" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts_debug.lib libsnmp.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Debug_TS/php_snmp.dll" /libpath:"..\..\Debug_TS" !ENDIF Patch for config.w32: --- config.w32 2005-12-30 16:19:21.28125 -0500 +++ Backup/config.w32 2003-12-19 12:00:10.0 -0500 @@ -4,18 +4,13 @@ ARG_WITH("snmp", "SNMP support", "no"); if (PHP_SNMP != "no") { - if (CHECK_HEADER_ADD_INCLUDE("snmp.h", "CFLAGS_SNMP", PHP_PHP_BUILD + "\\include\\ucd-snmp;" + PHP_PHP_BUILD + "\\include\\net-snmp;" + PHP_SNMP)) { - if (CHECK_LIB("netsnmp.lib", "snmp", PHP_SNMP)) { - EXTENSION('snmp', 'snmp.c'); - AC_DEFINE('HAVE_SNMP', 1); - AC_DEFINE('HAVE_NET_SNMP', 1); - AC_DEFINE('MSVC_PERL', 1); - } else if (CHECK_LIB("libsnmp.lib", "snmp", PHP_SNMP)) { + + if (CHECK_HEADER_ADD_INCLUDE("snmp.h", "CFLAGS_SNMP", PHP_PHP_BUILD + "\\include\\ucd-snmp;" + PHP_PHP_BUILD + "\\include\\net-snmp;" + PHP_SNMP) && + CHECK_LIB("libsnmp.lib", "snmp", PHP_SNMP)) { EXTENSION('snmp', 'snmp.c'); + AC_DEFINE('HAVE_SNMP', 1); - } else { - WARNING("snmp not enabled; libraries and headers not found"); - } + } else { WARNING("snmp not
Bug #64124 [Csd->Fbk]: IPv6 malformed
Edit report at https://bugs.php.net/bug.php?id=64124&edit=1 ID: 64124 Updated by: lytbo...@php.net Reported by:andy at root dot lu Summary:IPv6 malformed -Status: Closed +Status: Feedback Type: Bug Package:SNMP related Operating System: * PHP Version:5.4.* Assigned To:lytboris Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2013-02-07 17:43:56] lytbo...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=ed6763420c10c5eb47d6db675322ecaa6de079b6 Log: fix bug #64124 (IPv6 malformed) [2013-02-07 17:42:17] lytbo...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=ed6763420c10c5eb47d6db675322ecaa6de079b6 Log: fix bug #64124 (IPv6 malformed) [2013-02-07 17:36:34] lytbo...@php.net Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=ed6763420c10c5eb47d6db675322ecaa6de079b6 Log: fix bug #64124 (IPv6 malformed) [2013-02-07 08:01:07] lytbo...@php.net johannes, I found the same bug source an currently I'm in the middle of testing it. ps. I wonder why specifying "s/" in param parsing call is not enough... [2013-02-06 22:11:02] andy at root dot lu Hi, patch went well, but I am getting a segmentation fault while executing the code. I made sure to use make distclean first, so I recompiled everything from scratch. I used the current built: php5.4-201302011830 (which worked with the same test code before I applied the patch) The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=64124 -- Edit this bug report at https://bugs.php.net/bug.php?id=64124&edit=1
Bug #64124 [Asn->Csd]: IPv6 malformed
Edit report at https://bugs.php.net/bug.php?id=64124&edit=1 ID: 64124 Updated by: lytbo...@php.net Reported by:andy at root dot lu Summary:IPv6 malformed -Status: Assigned +Status: Closed Type: Bug Package:SNMP related Operating System: * PHP Version:5.4.* Assigned To:lytboris Block user comment: N Private report: N New Comment: Automatic comment on behalf of lytboris Revision: http://git.php.net/?p=php-src.git;a=commit;h=ed6763420c10c5eb47d6db675322ecaa6de079b6 Log: fix bug #64124 (IPv6 malformed) Previous Comments: [2013-02-07 08:01:07] lytbo...@php.net johannes, I found the same bug source an currently I'm in the middle of testing it. ps. I wonder why specifying "s/" in param parsing call is not enough... [2013-02-06 22:11:02] andy at root dot lu Hi, patch went well, but I am getting a segmentation fault while executing the code. I made sure to use make distclean first, so I recompiled everything from scratch. I used the current built: php5.4-201302011830 (which worked with the same test code before I applied the patch) [2013-02-06 21:48:19] johan...@php.net Hi Andy, I don't have an SNMP-enabled device at hand, can you try this patch? https://github.com/johannes/php-src/compare/bug64124.diff This should fix the only potential problem explaining this. Thanks. [2013-02-01 19:12:33] andy at root dot lu Basically calling snmpget more than once will throw this error. Code: $ip = "[2001:abc:dead:beef::22]"; $test = snmpget($ip, "mycommunity", "something"); $test = snmpget($ip, "mycommunity", "something-else"); $test = snmpget($ip, "mycommunity", "something-different"); Throws this error twice: Warning: snmpget(): malformed IPv6 address, closing square bracket missing in test.php Warning: snmpget(): malformed IPv6 address, closing square bracket missing in test.php [2013-02-01 19:03:42] andy at root dot lu Updated to latest. Problem persists. I noticed something though: This code works (only 2 lines): $ip = "[2001:abc:dead:beef::22]"; $test = snmpget($ip, "mycommunity", "something"); This code does not work and throws the error about missing closing bracket: $ip = "[2001:abc:dead:beef::22]"; for($j=1;$j<5;$j++) { $test = snmpget($ip, "mycommunity", "something".$j); echo "Outlet $j: $test\n"; } First iteration of for loop works fine, but after second iteration it complains about malformed ipv6 address, which does not make any sense. Same issue happens if I use a while loop. OUTPUT: Outlet 1: 1 Warning: snmpget(): malformed IPv6 address, closing square bracket missing in test.php on line 9 Outlet 2: Warning: snmpget(): malformed IPv6 address, closing square bracket missing in test.php on line 9 Outlet 3: Warning: snmpget(): malformed IPv6 address, closing square bracket missing in test.php on line 9 Outlet 4: The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=64124 -- Edit this bug report at https://bugs.php.net/bug.php?id=64124&edit=1
Bug #64124 [Asn]: IPv6 malformed
Edit report at https://bugs.php.net/bug.php?id=64124&edit=1 ID: 64124 Updated by: lytbo...@php.net Reported by:andy at root dot lu Summary:IPv6 malformed Status: Assigned Type: Bug Package:SNMP related -Operating System: Debian Squeeze +Operating System: * -PHP Version:5.4.11 +PHP Version:5.4.* Assigned To:lytboris Block user comment: N Private report: N New Comment: johannes, I found the same bug source an currently I'm in the middle of testing it. ps. I wonder why specifying "s/" in param parsing call is not enough... Previous Comments: [2013-02-06 22:11:02] andy at root dot lu Hi, patch went well, but I am getting a segmentation fault while executing the code. I made sure to use make distclean first, so I recompiled everything from scratch. I used the current built: php5.4-201302011830 (which worked with the same test code before I applied the patch) [2013-02-06 21:48:19] johan...@php.net Hi Andy, I don't have an SNMP-enabled device at hand, can you try this patch? https://github.com/johannes/php-src/compare/bug64124.diff This should fix the only potential problem explaining this. Thanks. [2013-02-01 19:12:33] andy at root dot lu Basically calling snmpget more than once will throw this error. Code: $ip = "[2001:abc:dead:beef::22]"; $test = snmpget($ip, "mycommunity", "something"); $test = snmpget($ip, "mycommunity", "something-else"); $test = snmpget($ip, "mycommunity", "something-different"); Throws this error twice: Warning: snmpget(): malformed IPv6 address, closing square bracket missing in test.php Warning: snmpget(): malformed IPv6 address, closing square bracket missing in test.php [2013-02-01 19:03:42] andy at root dot lu Updated to latest. Problem persists. I noticed something though: This code works (only 2 lines): $ip = "[2001:abc:dead:beef::22]"; $test = snmpget($ip, "mycommunity", "something"); This code does not work and throws the error about missing closing bracket: $ip = "[2001:abc:dead:beef::22]"; for($j=1;$j<5;$j++) { $test = snmpget($ip, "mycommunity", "something".$j); echo "Outlet $j: $test\n"; } First iteration of for loop works fine, but after second iteration it complains about malformed ipv6 address, which does not make any sense. Same issue happens if I use a while loop. OUTPUT: Outlet 1: 1 Warning: snmpget(): malformed IPv6 address, closing square bracket missing in test.php on line 9 Outlet 2: Warning: snmpget(): malformed IPv6 address, closing square bracket missing in test.php on line 9 Outlet 3: Warning: snmpget(): malformed IPv6 address, closing square bracket missing in test.php on line 9 Outlet 4: [2013-02-01 11:28:01] johan...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Works for me (Warning: snmpget(): Invalid object identifier: something in - on line 3) and code looks correct, too. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=64124 -- Edit this bug report at https://bugs.php.net/bug.php?id=64124&edit=1
Bug #61197 [Opn->Nab]: SNMPv3 cannot connect after reboot
Edit report at https://bugs.php.net/bug.php?id=61197&edit=1 ID: 61197 Updated by: lytbo...@php.net Reported by:markn at ieee dot org Summary:SNMPv3 cannot connect after reboot -Status: Open +Status: Not a bug Type: Bug Package:SNMP related -Operating System: Linux +Operating System: Irrelevant PHP Version:Irrelevant -Assigned To: +Assigned To:lytboris Block user comment: N Private report: N New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. This is bug in Net-SNMP library: you can try this simple script as a proof that snmpwalk has the same flaw: snmpwalk -v3 -l authNoPriv -a MD5 -u admin -A Password01 192.168.1.1 . >out &;sleep 0.2; /etc/init.d/snmpd restart Basically this engine* stuff should be maintained in SNMP-library itself: php-snmp does not specify (and maintain) these variables at all. Previous Comments: [2012-02-27 21:31:22] markn at ieee dot org wrong email address. bad day at the keyboard. [2012-02-27 21:17:10] markn at ieee dot org Description: Under certain conditions, it is not possible to reconnect to a device that has rebooted while using SNMPv3. This happens if a PHP script is connecting with authNoPriv or authPriv. After the device reboots, PHP's SNMPv3 routines do not take note of the modified msgAuthoritativeEngineReboots count and the modified msgAuthoritativeEngineTime values - they continue trying to use the old values, and as a result are never able to communicate after a reboot. During device maintenance, it is often necessary to reboot a device - such as after a firmware upgrade. So this is actually something that is needed. Basically, there needs to be a way to discard existing session information. Test script: --- Expected result: Run this script, verify that it successfully reads the data. Reboot the device and see that it is unable to read the data after the device is back up. Use Wireshark to observe that the boot count and time values have changed, but the PHP SNMP routines ignore the new values. -- Edit this bug report at https://bugs.php.net/bug.php?id=61197&edit=1
Bug #53862 [Fbk->NoF]: snmp_set_oid_output_format does not allow returning to default etc
Edit report at https://bugs.php.net/bug.php?id=53862&edit=1 ID: 53862 Updated by: lytbo...@php.net Reported by:mloftis at wgops dot com Summary:snmp_set_oid_output_format does not allow returning to default etc -Status: Feedback +Status: No Feedback Type: Bug Package:SNMP related Operating System: Irrelevant PHP Version:5.3.5 Assigned To:lytboris Block user comment: N Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: [2011-01-31 12:53:54] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php-trunk-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Please check OO API from trunk. It has an option to specify session-wise OID output format and more. Sources in trunk can be compiled against downto php 5.2 [2011-01-28 00:18:00] mloftis at wgops dot com Description: snmp_set_oid_output_format only allows using the FULL (SNMP_OID_OUTPUT_FULL) or NUMERIC (SNMP_OID_OUTPUT_NUMERIC) setting types, neither of which is the default. It also has no corresponding _get_ function call to query/store and return the setting back to "whatever it was before I touched it" I've attached a patch which does both (from the 5.3 branch), extends the existing function to include the available types in UCD Net-SNMP as of 5.4 (not verified/checked against older ones, have not verified that setting to _NONE will not cause crashes). Test script: --- $rvDefault = snmp2_get('127.0.0.1','public','.1.3.6.1.2.1.1.2.0'); snmp_set_oid_output_format(SNMP_OID_OUTPUT_FULL); $rvFull = snmp2_get('127.0.0.1','public','.1.3.6.1.2.1.1.2.0'); snmp_set_oid_output_format(SNMP_OID_OUTPUT_NUMERIC); $rvNumeric = snmp2_get('127.0.0.1','public','.1.3.6.1.2.1.1.2.0'); echo $rvDefault."\n"; echo $rvFull."\n"; echo $rvNumeric."\n"; Expected result: Setting either SNMP_OID_OUTPUT_FULL or SNMP_OID_OUTPUT_NUMERIC would return the library to it's default. Expect there to be an snmp_get_oid_output_format call as well to query the current setting. Actual result: -- Neither of the available snmp_set_oid_output_format constants can return the library to it's default settings. No ability to query the library for the current setting. -- Edit this bug report at https://bugs.php.net/bug.php?id=53862&edit=1
Bug #46065 [Fbk->NoF]: snmp_set_quick_print() persists between requests
Edit report at https://bugs.php.net/bug.php?id=46065&edit=1 ID: 46065 Updated by: lytbo...@php.net Reported by:php at painfullscratch dot nl Summary:snmp_set_quick_print() persists between requests -Status: Feedback +Status: No Feedback Type: Bug Package:SNMP related Operating System: * PHP Version:5.*, 6 Assigned To:lytboris Block user comment: N Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: [2011-01-31 12:58:04] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php-trunk-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Please check OO API from trunk. It has an option to specify session-wise OID output format and more. Sources in trunk can be compiled against downto php 5.2 [2009-09-08 21:16:19] larryjadams at comcast dot net The snmp module needs a bit of rededesign. It should handle many of the commands from the native calls, like multiple OID get's in a single array, in other words, make the OID a mixed type for a get request. Also, the snmp functions should require a resource (aka snmp session) in order to work, just like is done in the API, for which it would be based. In that case, to setup a quick print, you start a session, receive a pointer to a (structure/resource) in return and then all subsequent calls need to also pass the resource to the function. Once you are done, you need to close the sessions. This will have to be a new class of calls though as simply changing thing around will make life difficult for everyone. TheWitness [2008-10-24 08:56:21] j...@php.net It's pretty simple issue, propably need to add some netsnmp shutdown function in RINIT which clears all the settings between requests. [2008-09-12 13:27:09] php at painfullscratch dot nl Description: When PHP runs under Apache and snmp_set_quick_print(TRUE) is issued, the behavior of all SNMP-related functions will be "quick print" for the lifetime of the PID. NET-SNMP Support => enabled NET-SNMP Version => 5.4.1 PHP version: 5.2.4 There are two possibilities: 1) This behavior is "by design": If this is the case I think the manual page for snmp_set_quick_print() needs a warning for this behavior. 2) This is a bug: For each PID the behavior should be (re)set to the default behavior after execution of the script. Reproduce code: --- pet@workmate:/tmp$ sudo /etc/init.d/apache2 restart > /dev/null 2>&1 pet@workmate:/tmp$ for (( i=0; i<5; i++ )) ; do links -dump http://localhost/snmp_get_quick_print.php; done snmp_get_quick_print: '' | pid: '9402' snmp_get_quick_print: '' | pid: '9403' snmp_get_quick_print: '' | pid: '9404' snmp_get_quick_print: '' | pid: '9405' snmp_get_quick_print: '' | pid: '9406' pet@workmate:/tmp$ links -dump http://localhost/snmp_set_quick_print.php snmp_set_quick_print: '' | pid: '9406' pet@workmate:/tmp$ for (( i=0; i<5; i++ )) ; do links -dump http://localhost/snmp_get_quick_print.php; done snmp_get_quick_print: '' | pid: '9403' snmp_get_quick_print: '' | pid: '9404' snmp_get_quick_print: '' | pid: '9446' snmp_get_quick_print: '' | pid: '9405' snmp_get_quick_print: '1' | pid: '9406' -- Edit this bug report at https://bugs.php.net/bug.php?id=46065&edit=1
Bug #44193 [Fbk->NoF]: snmp v3 noAuthNoPriv doesn't work
Edit report at https://bugs.php.net/bug.php?id=44193&edit=1 ID: 44193 Updated by: lytbo...@php.net Reported by:mavezeau at colubris dot com Summary:snmp v3 noAuthNoPriv doesn't work -Status: Feedback +Status: No Feedback Type: Bug Package:SNMP related Operating System: Mandriva 2005/linux PHP Version:5.2CVS-2008-10-27 Assigned To: lytboris Block user comment: N Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: [2011-01-31 13:03:19] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php-trunk-latest.tar.gz For Windows: http://windows.php.net/snapshots/ There is full support for SNMPv3 (with contextName and EngineID) in OO API available in trunk. It needs to be documented though. [2009-09-08 21:21:55] larryjadams at comcast dot net That's not quite it. That section of the code simply needs to be finished, let alone be documented. [2008-10-27 16:33:50] mavezeau at colubris dot com Now, Some parts work. The security level AuthNoPriv and AuthPriv work but noAuthNoPriv doesn't works because php doesn't accept null or '' to auth_protocol and priv_protocol. I think this fix is simple the snmp v3 with noAuthNopriv is very similar of snmp v2c. if I try: snmp3_walk('192.168.130.124','test','noAuthNoPriv','MD5','','','',''); I have this error "error(snmp3_walk(): Could not generate key for authentication pass phrase: MD5)" if I try: snmp3_walk('192.168.130.124','test','noAuthNoPriv',null,null,null,null,''); or snmp3_walk('192.168.130.124','test','noAuthNoPriv','',null,null,null,''); I have this error "Invalid authenfication protocol:" [2008-02-20 21:23:28] mavezeau at colubris dot com Description: I try to make a query with snmp v3 and I have an error: "snmp3_walk(): An error occurred" or "snmp3_walk(): No response from 192.168.130.124". If I execute a query with net-snmp 5.4.1 the query is ok. If I execute the similar query with php I have those errors. Reproduce code: --- AuthNoPriv net-snmp Query: snmpwalk -v 3 -l authNoPriv -a MD5 -A jesuisuntest -u test5 192.168.130.124 it Works! Php snmp snmp3_walk('192.168.130.124','test5','authNoPriv','MD5','jesuisuntest','','',''); Error ! noAuthNoPriv net-snmp query: snmpwalk -v 3 -l noAuthNoPriv -u test 192.168.130.124 it works! PHP snmp snmp3_walk('192.168.130.124','test','noAuthNoPriv','','','','',''); error(snmp3_walk(): Invalid authentication protocol) if use the default snmp3_walk('192.168.130.124','test','noAuthNoPriv','MD5','','','',''); error(snmp3_walk(): Could not generate key for authentication pass phrase: MD5) Expected result: Similar return value than smnp v2c Actual result: -- all method make an error -- Edit this bug report at https://bugs.php.net/bug.php?id=44193&edit=1
Bug #60585 [Asn->Fbk]: php build fails with USE flag snmp when IPv6 support is disabled
Edit report at https://bugs.php.net/bug.php?id=60585&edit=1 ID: 60585 Updated by: lytbo...@php.net Reported by:sknizek at cyberport dot de Summary:php build fails with USE flag snmp when IPv6 support is disabled -Status: Assigned +Status: Feedback Type: Bug Package:SNMP related Operating System: Gentoo Linux PHP Version:5.4.0RC3 Assigned To:lytboris Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2012-01-13 18:46:26] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=322214 Log: merge from trunk: Fixed bug #60585 (php build fails with USE flag snmp when IPv6 support is disabled Fixed bug #60749 (SNMP module should not strip non-standard SNMP port from hostname [2012-01-13 18:33:51] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=322213 Log: Fixed bug #60585 (php build fails with USE flag snmp when IPv6 support is disabled) Fixed bug #60749 (SNMP module should not strip non-standard SNMP port from hostname) Fixed ipv6 test skipto if IPv6 support is disabled [2012-01-08 22:18:02] morusec at hotmail dot com Same issue with 5.4.3_rc5, just can't compile php with snmp use flag. (net-snmp 5.3.4) /var/tmp/portage/dev-lang/php-5.4.0_rc5/work/sapis-build/cli/ext/snmp/snmp.c: In function 'php_snmp_error': /var/tmp/portage/dev-lang/php-5.4.0_rc5/work/sapis-build/cli/ext/snmp/snmp.c:536:3: warning: passing argument 3 of 'zend_throw_exception_ex' from incompatible pointer type /var/tmp/portage/dev-lang/php-5.4.0_rc5/work/sapis-build/cli/Zend/zend_exceptions.h:44:17: note: expected 'void ***' but argument is of type 'char *' /var/tmp/portage/dev-lang/php-5.4.0_rc5/work/sapis-build/cli/ext/snmp/snmp.c:536:3: warning: passing argument 4 of 'zend_throw_exception_ex' from incompatible pointer type /var/tmp/portage/dev-lang/php-5.4.0_rc5/work/sapis-build/cli/Zend/zend_exceptions.h:44:17: note: expected 'char *' but argument is of type 'void ***' /var/tmp/portage/dev-lang/php-5.4.0_rc5/work/sapis-build/cli/ext/snmp/snmp.c: In function 'netsnmp_session_init': /var/tmp/portage/dev-lang/php-5.4.0_rc5/work/sapis-build/cli/ext/snmp/snmp.c:1174:10: error: request for member 'sa_family' in something not a structure or union /var/tmp/portage/dev-lang/php-5.4.0_rc5/work/sapis-build/cli/ext/snmp/snmp.c:1178:3: error: incompatible type for argument 1 of 'inet_ntoa' /usr/include/arpa/inet.h:54:14: note: expected 'struct in_addr' but argument is of type 'struct sockaddr **' make: *** [ext/snmp/snmp.lo] Error 1 [2011-12-21 13:44:37] sknizek at cyberport dot de Description: I try to build php5.4.0rc3 on Gentoo with following USE flags: bcmath bzip2 cgi cli crypt ctype curl fileinfo filter ftp gd gdbm hash iconv json mhash mysql mysqli nls pdo phar posix readline session simplexml snmp* sockets sqlite3 ssl threads tokenizer truetype unicode xml xmlreader xmlrpc xmlwriter zlib -apache2 -berkdb -calendar -cdb -cjk -curlwrappers -debug -doc -embed -enchant -exif -firebird -flatfile -fpm (-frontbase) -gmp -imap -inifile -intl -iodbc -ipv6 -kerberos -kolab -ldap -ldap-sasl -libedit -mssql -mysqlnd -oci8-instant-client -odbc -pcntl -pic -postgres -qdbm -recode -sharedmem -soap -spell (-sybase-ct) -sysvipc -tidy -wddx -xpm -xsl -zip but it fails. As soon as I remove the snmp USE flag, the build works. Versions: - net-snmp: 5.4.3 - Net-SNMP: 6.0.1 Expected result: php build with snmp support Actual result: -- /var/tmp/portage/dev-lang/php-5.4.0_rc3/work/sapis-build/cli/ext/snmp/snmp.c: In function 'php_snmp_error': /var/tmp/portage/dev-lang/php-5.4.0_rc3/work/sapis-build/cli/ext/snmp/snmp.c:536:3: warning: passing argument 3 of 'zend_throw_exception_ex' from incompatible pointer type /var/tmp/portage/dev-lang/php-5.4.0_rc3/work/sapis-build/cli/Zend/zend_exceptions.h:44:17: note: expected 'void ***' but argument is of type 'char *' /var/tmp/portage/dev-lang/php-5.4.0_rc3/work/sapis-build/cli/ext/snmp/snmp.c:536:3: warning: passing argument 4 of 'zend_throw_exception_ex' from incompatible pointer type /var/tmp/portage/dev-lang/php-5.4
Bug #60749 [Asn->Fbk]: SNMP module should not strip non-standard SNMP port from hostname
Edit report at https://bugs.php.net/bug.php?id=60749&edit=1 ID: 60749 Updated by: lytbo...@php.net Reported by:lytbo...@php.net Summary:SNMP module should not strip non-standard SNMP port from hostname -Status: Assigned +Status: Feedback Type: Bug Package:SNMP related Operating System: * PHP Version:5.4.0RC5 Assigned To:lytboris Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2012-01-13 18:46:27] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=322214 Log: merge from trunk: Fixed bug #60585 (php build fails with USE flag snmp when IPv6 support is disabled Fixed bug #60749 (SNMP module should not strip non-standard SNMP port from hostname [2012-01-13 18:33:52] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=322213 Log: Fixed bug #60585 (php build fails with USE flag snmp when IPv6 support is disabled) Fixed bug #60749 (SNMP module should not strip non-standard SNMP port from hostname) Fixed ipv6 test skipto if IPv6 support is disabled [2012-01-13 17:39:50] lytbo...@php.net Description: >From net-snmp/include/net-snmp/types.h, struct snmp_session: /** name or address of default peer (may include transport specifier and/or port number) */ char *peername; /** UDP port number of peer. (NO LONGER USED - USE peername INSTEAD) */ u_short remote_port; php-snmp should place non-standard SNMP port into peername after name resolution. Test script: --- $session = new SNMP(SNMP::VERSION_1, "$hostname:$port", $community, $timeout, $retries); $session->get(".1"); Expected result: $session->get() will send request to "$hostname:$port" Actual result: -- $session->get() will send request to "$hostname:161" -- Edit this bug report at https://bugs.php.net/bug.php?id=60749&edit=1
Bug #43410 [Fbk->NoF]: SNMP cause "PHP has encountered an Access Violation" when wrong IP or CommStr
Edit report at https://bugs.php.net/bug.php?id=43410&edit=1 ID: 43410 Updated by: lytbo...@php.net Reported by:andy_wolk at mail dot ru Summary:SNMP cause "PHP has encountered an Access Violation" when wrong IP or CommStr -Status: Feedback +Status: No Feedback Type: Bug Package:SNMP related Operating System: Windows 2003 Server Enterprise PHP Version:5.2.5 Block user comment: N Private report: N Previous Comments: [2010-09-14 10:55:17] paj...@php.net Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2010-09-14 08:29:50] andy_wolk at mail dot ru Still got the problem. We use the latest 5.2.x version as isapi. But no luck. I think we are not alone. Check this out (a post from Mar 2010)http://stackoverflow.com/questions/154290/php-access-violation/2482839#2482839 [2008-10-29 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2008-10-21 12:06:43] j...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Do not paste such huge texts here. Put them somewhere in net (like http://phpfi.com/) where we can check them out. [2007-11-26 11:50:45] andy_wolk at mail dot ru Description: SNMP functions cause "PHP has encountered an Access Violation" when wrong IP or Community String. IIS 6 + PHP5.2.2dev isapi module. PHP_snmp.dll (ver 5.2.2.2) All next php versions has the same problem. After this error, IIS does not can operate with snmp module and needs to be restarted. Event viewer: Faulting application w3wp.exe, version 6.0.3790.3959, faulting module unknown, version 0.0.0.0, fault address 0x010cfdf4. No errors in php_error.log Reproduce code: --- Expected result: Start...Finish Actual result: -- Start...PHP has encountered an Access Violation at -- Edit this bug report at https://bugs.php.net/bug.php?id=43410&edit=1
Req #54378 [Fbk->Csd]: Ability to ignore OID not increasing error
Edit report at https://bugs.php.net/bug.php?id=54378&edit=1 ID: 54378 Updated by: lytbo...@php.net Reported by:ch at lathspell dot de -Summary:Expose snmp_in/out/mib_toggle_options() +Summary:Ability to ignore OID not increasing error -Status: Feedback +Status: Closed Type: Feature/Change Request Package:SNMP related PHP Version:trunk-SVN-2011-03-24 (SVN) -Assigned To: +Assigned To:lytboris Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: [2011-07-29 00:44:11] c...@php.net Thanks, that should do it. [2011-07-18 17:02:26] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ I've added noOIDIncreasingCheck property. When set to true, walk method works exactly as snmpwalk with -Cc flag. [2011-03-24 22:30:27] ch at lathspell dot de Description: The snmpcmd(1) man page lists a lot of options, some of them should probably be better done in PHP but some, like -Pc or -Cc could be necessary in rare cases. An alternative would be to expose the "-Y" function netsnmp_config_remember(). Of course it should be documented that these function alter the global behaviour and not just the current session. Also that they are Net-SNMP specific. Test script: --- - Expected result: - Actual result: -- - -- Edit this bug report at https://bugs.php.net/bug.php?id=54378&edit=1
Req #55542 [Asn->Csd]: SNMP class should use Exceptions instead of PHP Errors
Edit report at https://bugs.php.net/bug.php?id=55542&edit=1 ID: 55542 Updated by: lytbo...@php.net Reported by:c...@php.net Summary:SNMP class should use Exceptions instead of PHP Errors -Status: Assigned +Status: Closed Type: Feature/Change Request Package:SNMP related PHP Version:5.4.0alpha3 Assigned To:lytboris Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: [2011-09-02 19:56:30] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=316054 Log: documentation for SNMPException class (FR #55542) [2011-09-02 18:52:37] lytbo...@php.net Here it is thread in PHP-DEV I mentioned: http://marc.info/?l=php-internals&m=129853991816725 Unless something changes I would prefer to techniques described there. [2011-09-02 12:05:43] c...@php.net But PDO has a history back to PHP4 or the days where people where used to check every single return value for PEAR_Error. The SNMP class is new and could lead as good example for proper OOP style! (Or do you prefer C style $errno checking after every method call over try/catch statements? The chances that an error goes unnoticed is much lower with exceptions.) [2011-09-02 11:48:34] lytbo...@php.net enable SNMP::ERRNO_ANY by default is not a good idea I think. PDO has the same default behavior for throwing exceptions. [2011-09-02 10:41:20] c...@php.net Thanks for implementing this so quickly. But the constructor still says: "snmp_object->exceptions_enabled = 0;", as this is a class one would rather expect OOP style exceptions as default, or? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=55542 -- Edit this bug report at https://bugs.php.net/bug.php?id=55542&edit=1
Req #55542 [Asn]: SNMP class should use Exceptions instead of PHP Errors
Edit report at https://bugs.php.net/bug.php?id=55542&edit=1 ID: 55542 Updated by: lytbo...@php.net Reported by:c...@php.net Summary:SNMP class should use Exceptions instead of PHP Errors Status: Assigned Type: Feature/Change Request Package:SNMP related PHP Version:5.4.0alpha3 Assigned To:lytboris Block user comment: N Private report: N New Comment: Here it is thread in PHP-DEV I mentioned: http://marc.info/?l=php-internals&m=129853991816725 Unless something changes I would prefer to techniques described there. Previous Comments: [2011-09-02 12:05:43] c...@php.net But PDO has a history back to PHP4 or the days where people where used to check every single return value for PEAR_Error. The SNMP class is new and could lead as good example for proper OOP style! (Or do you prefer C style $errno checking after every method call over try/catch statements? The chances that an error goes unnoticed is much lower with exceptions.) [2011-09-02 11:48:34] lytbo...@php.net enable SNMP::ERRNO_ANY by default is not a good idea I think. PDO has the same default behavior for throwing exceptions. [2011-09-02 10:41:20] c...@php.net Thanks for implementing this so quickly. But the constructor still says: "snmp_object->exceptions_enabled = 0;", as this is a class one would rather expect OOP style exceptions as default, or? [2011-09-02 10:13:21] lytbo...@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. A new SNMP object property is introduced: exceptions_enabled. Setting this property to ORed combination of SNMP::ERRNO_* errors will enable exception throwing on these errors. SNMP::ERRNO_ANY may be used to enable all posslible SNMP::ERRNO_* errors at once. [2011-09-02 10:13:19] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=316032 Log: merge from trunk added SNMPException class, enabling ability to throw exceptions when a known SNMP error has occured FR #55542 The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=55542 -- Edit this bug report at https://bugs.php.net/bug.php?id=55542&edit=1
Req #55542 [Asn]: SNMP class should use Exceptions instead of PHP Errors
Edit report at https://bugs.php.net/bug.php?id=55542&edit=1 ID: 55542 Updated by: lytbo...@php.net Reported by:c...@php.net Summary:SNMP class should use Exceptions instead of PHP Errors Status: Assigned Type: Feature/Change Request Package:SNMP related PHP Version:5.4.0alpha3 Assigned To:lytboris Block user comment: N Private report: N New Comment: enable SNMP::ERRNO_ANY by default is not a good idea I think. PDO has the same default behavior for throwing exceptions. Previous Comments: [2011-09-02 10:41:20] c...@php.net Thanks for implementing this so quickly. But the constructor still says: "snmp_object->exceptions_enabled = 0;", as this is a class one would rather expect OOP style exceptions as default, or? [2011-09-02 10:13:21] lytbo...@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. A new SNMP object property is introduced: exceptions_enabled. Setting this property to ORed combination of SNMP::ERRNO_* errors will enable exception throwing on these errors. SNMP::ERRNO_ANY may be used to enable all posslible SNMP::ERRNO_* errors at once. [2011-09-02 10:13:19] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=316032 Log: merge from trunk added SNMPException class, enabling ability to throw exceptions when a known SNMP error has occured FR #55542 [2011-09-02 10:04:08] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=316029 Log: added SNMPException class, enabling ability to throw exceptions when a known SNMP error has occured FR #55542 [2011-08-30 22:15:06] c...@php.net Description: Hello Subject says all, IMHO it does not make sense to start writing a new class that does not use 100% exceptions. This bug is a follow up on #40816 which ended with: [2011-08-30 15:18 UTC] lytbo...@php.net > I have read a bunch of threads on php-dev about extensions throwing > exceptions and the last thing I remember that extension should not throw any > exception except object creation if there is no way to disable them. > Anyway, if to throw exceptions, library will throw an exception for each > error, not only parsing error. Please, please, convinced yourself that Exceptions are cool and worth refactoring the code. I'd be willing to help with writing tests :) I'd be curious about the threads you mentioned (a quick google found nothing but then the keywords are very common) but there are already some extensions (spl/php_spl.c, mysql/php_mysql.c, reflection/php_reflection.c) that do throw Exceptions. -- Edit this bug report at https://bugs.php.net/bug.php?id=55542&edit=1
Req #55542 [Asn->]: SNMP class should use Exceptions instead of PHP Errors
Edit report at https://bugs.php.net/bug.php?id=55542&edit=1 ID: 55542 Updated by: lytbo...@php.net Reported by:c...@php.net Summary:SNMP class should use Exceptions instead of PHP Errors -Status: Assigned +Status: To be documented Type: Feature/Change Request Package:SNMP related PHP Version:5.4.0alpha3 Assigned To:lytboris Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. A new SNMP object property is introduced: exceptions_enabled. Setting this property to ORed combination of SNMP::ERRNO_* errors will enable exception throwing on these errors. SNMP::ERRNO_ANY may be used to enable all posslible SNMP::ERRNO_* errors at once. Previous Comments: [2011-09-02 10:13:19] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=316032 Log: merge from trunk added SNMPException class, enabling ability to throw exceptions when a known SNMP error has occured FR #55542 [2011-09-02 10:04:08] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=316029 Log: added SNMPException class, enabling ability to throw exceptions when a known SNMP error has occured FR #55542 [2011-08-30 22:15:06] c...@php.net Description: Hello Subject says all, IMHO it does not make sense to start writing a new class that does not use 100% exceptions. This bug is a follow up on #40816 which ended with: [2011-08-30 15:18 UTC] lytbo...@php.net > I have read a bunch of threads on php-dev about extensions throwing > exceptions and the last thing I remember that extension should not throw any > exception except object creation if there is no way to disable them. > Anyway, if to throw exceptions, library will throw an exception for each > error, not only parsing error. Please, please, convinced yourself that Exceptions are cool and worth refactoring the code. I'd be willing to help with writing tests :) I'd be curious about the threads you mentioned (a quick google found nothing but then the keywords are very common) but there are already some extensions (spl/php_spl.c, mysql/php_mysql.c, reflection/php_reflection.c) that do throw Exceptions. -- Edit this bug report at https://bugs.php.net/bug.php?id=55542&edit=1
Bug #55557 [Opn]: windows zip files missing content in extras directory
Edit report at https://bugs.php.net/bug.php?id=7&edit=1 ID: 7 Updated by: lytbo...@php.net Reported by:longneck at iname dot com -Summary:windows zip files missing mibs directory +Summary:windows zip files missing content in extras directory Status: Open Type: Bug -Package:SNMP related +Package:Windows Installer Operating System: windows PHP Version:5.3.8 Block user comment: N Private report: N New Comment: Actually extras folder is empty, not only mibs is missing. Previous Comments: [2011-08-31 20:39:33] longneck at iname dot com Description: the 5.3.x series of ZIP files on windows.php.net are missing the extras\mibs folder. the 5.2.x series does have the folder. Test script: --- n/a -- Edit this bug report at https://bugs.php.net/bug.php?id=7&edit=1
Req #40816 [Asn->Csd]: Perform multiple OID operations in transaction manner
Edit report at https://bugs.php.net/bug.php?id=40816&edit=1 ID: 40816 Updated by: lytbo...@php.net Reported by:ch at westend dot com Summary:Perform multiple OID operations in transaction manner -Status: Assigned +Status: Closed Type: Feature/Change Request Package:SNMP related Operating System: linux PHP Version:5.2.1 Assigned To:lytboris Block user comment: N Private report: N Previous Comments: [2011-08-31 19:58:38] lytbo...@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. [2011-08-31 08:40:46] lytbo...@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. [2011-08-31 08:40:15] lytbo...@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Commits 315862 & 315865 forces OID check before any query is made. Though set method will check type&value in chunked mode. If SET query should be done in multiple chunks (OID array supplied is bigger that max_oids) a warning will be raised. [2011-08-31 08:36:11] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315865 Log: more tuning based on discussion in FR #40816: * parse all OIDs earlier, detect all wrong OIDs before any query is made (GET-operations) * introduce ERRNO_MULTIPLE_SET_QUERIES: warn if request contains more OIDs than max_oids and SET operation (and type&value checks) will be done in chunks. fix set method when request contains more OIDs than max_oids (2nd and subsequent chunk were ignored) [2011-08-31 08:28:02] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315862 Log: more tuning based on discussion in FR #40816: * parse all OIDs earlier, detect all wrong OIDs before any query is made (GET-operations) * introduce ERRNO_MULTIPLE_SET_QUERIES: warn if request contains more OIDs than max_oids and SET operation (and type&value checks) will be done in chunks. fix set method when request contains more OIDs than max_oids (2nd and subsequent chunk were ignored) The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=40816 -- Edit this bug report at https://bugs.php.net/bug.php?id=40816&edit=1
Req #40816 [->Opn]: Perform multiple OID operations in transaction manner
Edit report at https://bugs.php.net/bug.php?id=40816&edit=1 ID: 40816 Updated by: lytbo...@php.net Reported by:ch at westend dot com Summary:Perform multiple OID operations in transaction manner -Status: To be documented +Status: Open Type: Feature/Change Request Package:SNMP related Operating System: linux PHP Version:5.2.1 Assigned To:lytboris Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: [2011-08-31 08:40:46] lytbo...@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. [2011-08-31 08:40:15] lytbo...@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Commits 315862 & 315865 forces OID check before any query is made. Though set method will check type&value in chunked mode. If SET query should be done in multiple chunks (OID array supplied is bigger that max_oids) a warning will be raised. [2011-08-31 08:36:11] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315865 Log: more tuning based on discussion in FR #40816: * parse all OIDs earlier, detect all wrong OIDs before any query is made (GET-operations) * introduce ERRNO_MULTIPLE_SET_QUERIES: warn if request contains more OIDs than max_oids and SET operation (and type&value checks) will be done in chunks. fix set method when request contains more OIDs than max_oids (2nd and subsequent chunk were ignored) [2011-08-31 08:28:02] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315862 Log: more tuning based on discussion in FR #40816: * parse all OIDs earlier, detect all wrong OIDs before any query is made (GET-operations) * introduce ERRNO_MULTIPLE_SET_QUERIES: warn if request contains more OIDs than max_oids and SET operation (and type&value checks) will be done in chunks. fix set method when request contains more OIDs than max_oids (2nd and subsequent chunk were ignored) [2011-08-30 22:16:56] c...@php.net Well, throwing exceptions everywhere is exactly what I'd with for but to discuss this I opened #55542. This one can be closed as we now have a way to check for the presence of a MIB (more or less convenient). The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=40816 -- Edit this bug report at https://bugs.php.net/bug.php?id=40816&edit=1
Req #40816 [Fbk->Opn]: Perform multiple OID operations in transaction manner
Edit report at https://bugs.php.net/bug.php?id=40816&edit=1 ID: 40816 Updated by: lytbo...@php.net Reported by:ch at westend dot com -Summary:Add "snmptranslate" function +Summary:Perform multiple OID operations in transaction manner -Status: Feedback +Status: Open Type: Feature/Change Request Package:SNMP related Operating System: linux PHP Version:5.2.1 Assigned To: lytboris Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Commits 315862 & 315865 forces OID check before any query is made. Though set method will check type&value in chunked mode. If SET query should be done in multiple chunks (OID array supplied is bigger that max_oids) a warning will be raised. Previous Comments: [2011-08-31 08:36:11] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315865 Log: more tuning based on discussion in FR #40816: * parse all OIDs earlier, detect all wrong OIDs before any query is made (GET-operations) * introduce ERRNO_MULTIPLE_SET_QUERIES: warn if request contains more OIDs than max_oids and SET operation (and type&value checks) will be done in chunks. fix set method when request contains more OIDs than max_oids (2nd and subsequent chunk were ignored) [2011-08-31 08:28:02] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315862 Log: more tuning based on discussion in FR #40816: * parse all OIDs earlier, detect all wrong OIDs before any query is made (GET-operations) * introduce ERRNO_MULTIPLE_SET_QUERIES: warn if request contains more OIDs than max_oids and SET operation (and type&value checks) will be done in chunks. fix set method when request contains more OIDs than max_oids (2nd and subsequent chunk were ignored) [2011-08-30 22:16:56] c...@php.net Well, throwing exceptions everywhere is exactly what I'd with for but to discuss this I opened #55542. This one can be closed as we now have a way to check for the presence of a MIB (more or less convenient). [2011-08-30 15:18:14] lytbo...@php.net I have read a bunch of threads on php-dev about extensions throwing exceptions and the last thing I remember that extension should not throw any exception except object creation if there is no way to disable them. Anyway, if to throw exceptions, library will throw an exception for each error, not only parsing error. [2011-08-30 15:10:48] ch at westend dot com Now the following works.. @$snmp->get(array($oid1, $oid2)); if ($snmp->getErrno() == SNMP::ERRNO_OID_PARSING_ERROR) { throw new Exception($snmp->getError()); } ... but why is there only a warning? Calling get() with a OID that does not even parses should throw an Exception? Especially as when using OOP, one does not expect having to call getErrno() after every call as we did in the last millenium or even worse don't catch this error. Can you wrapt this into a nice SnmpOidParsingException? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=40816 -- Edit this bug report at https://bugs.php.net/bug.php?id=40816&edit=1
Req #40816 [Asn->]: Perform multiple OID operations in transaction manner
Edit report at https://bugs.php.net/bug.php?id=40816&edit=1 ID: 40816 Updated by: lytbo...@php.net Reported by:ch at westend dot com Summary:Perform multiple OID operations in transaction manner -Status: Assigned +Status: To be documented Type: Feature/Change Request Package:SNMP related Operating System: linux PHP Version:5.2.1 Assigned To:lytboris Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2011-08-31 08:40:15] lytbo...@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Commits 315862 & 315865 forces OID check before any query is made. Though set method will check type&value in chunked mode. If SET query should be done in multiple chunks (OID array supplied is bigger that max_oids) a warning will be raised. [2011-08-31 08:36:11] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315865 Log: more tuning based on discussion in FR #40816: * parse all OIDs earlier, detect all wrong OIDs before any query is made (GET-operations) * introduce ERRNO_MULTIPLE_SET_QUERIES: warn if request contains more OIDs than max_oids and SET operation (and type&value checks) will be done in chunks. fix set method when request contains more OIDs than max_oids (2nd and subsequent chunk were ignored) [2011-08-31 08:28:02] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315862 Log: more tuning based on discussion in FR #40816: * parse all OIDs earlier, detect all wrong OIDs before any query is made (GET-operations) * introduce ERRNO_MULTIPLE_SET_QUERIES: warn if request contains more OIDs than max_oids and SET operation (and type&value checks) will be done in chunks. fix set method when request contains more OIDs than max_oids (2nd and subsequent chunk were ignored) [2011-08-30 22:16:56] c...@php.net Well, throwing exceptions everywhere is exactly what I'd with for but to discuss this I opened #55542. This one can be closed as we now have a way to check for the presence of a MIB (more or less convenient). [2011-08-30 15:18:14] lytbo...@php.net I have read a bunch of threads on php-dev about extensions throwing exceptions and the last thing I remember that extension should not throw any exception except object creation if there is no way to disable them. Anyway, if to throw exceptions, library will throw an exception for each error, not only parsing error. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=40816 -- Edit this bug report at https://bugs.php.net/bug.php?id=40816&edit=1
Req #40816 [Asn->Fbk]: Add "snmptranslate" function
Edit report at https://bugs.php.net/bug.php?id=40816&edit=1 ID: 40816 Updated by: lytbo...@php.net Reported by:ch at westend dot com Summary:Add "snmptranslate" function -Status: Assigned +Status: Feedback Type: Feature/Change Request Package:SNMP related Operating System: linux PHP Version:5.2.1 Assigned To: lytboris Block user comment: N Private report: N New Comment: I have read a bunch of threads on php-dev about extensions throwing exceptions and the last thing I remember that extension should not throw any exception except object creation if there is no way to disable them. Anyway, if to throw exceptions, library will throw an exception for each error, not only parsing error. Previous Comments: [2011-08-30 15:10:48] ch at westend dot com Now the following works.. @$snmp->get(array($oid1, $oid2)); if ($snmp->getErrno() == SNMP::ERRNO_OID_PARSING_ERROR) { throw new Exception($snmp->getError()); } ... but why is there only a warning? Calling get() with a OID that does not even parses should throw an Exception? Especially as when using OOP, one does not expect having to call getErrno() after every call as we did in the last millenium or even worse don't catch this error. Can you wrapt this into a nice SnmpOidParsingException? [2011-08-30 14:30:34] lytbo...@php.net Indeed. Commited sources into PHP_5_4 branch. [2011-08-30 09:52:01] ch at westend dot com As of SVN revision 315762 from now, the constant only appears in the tests, not in the class source. Running the tests yield to: Fatal error: Undefined class constant 'ERRNO_OID_PARSING_ERROR' in /home/chammers/workspace/php-src-5.4/ext/snmp/tests/snmp-object-errno-errstr.php on line 45 Maybe it's not yet committet? [2011-08-30 09:42:08] lytbo...@php.net Please check that you have ERRNO_OID_PARSING_ERROR in snmp extension sources. This constant appeared on 27th of august. [2011-08-30 09:21:17] ch at westend dot com The idea sounds good but it does not seem to work. The "Invalid object identifier" is thrown only as PHP Warning, not set in SNMP->error: $ cat test.php get(array($oid1, $oid2, $oid3)); printf("---\n%s (%d)\n\n", $snmp->getError(), $snmp->errno); $ ../php-src-5.4/sapi/cli/php -d include_path=.:/usr/share/php test.php Warning: SNMP::get(): Invalid object identifier: DOES-NOT-EXIST-MIB::FOO in /home/chammers/workspace/php_test/test.php on line 8 --- (0) The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=40816 -- Edit this bug report at https://bugs.php.net/bug.php?id=40816&edit=1
Req #40816 [Asn->Fbk]: Add "snmptranslate" function
Edit report at https://bugs.php.net/bug.php?id=40816&edit=1 ID: 40816 Updated by: lytbo...@php.net Reported by:ch at westend dot com Summary:Add "snmptranslate" function -Status: Assigned +Status: Feedback Type: Feature/Change Request Package:SNMP related Operating System: linux PHP Version:5.2.1 Assigned To: lytboris Block user comment: N Private report: N New Comment: Indeed. Commited sources into PHP_5_4 branch. Previous Comments: [2011-08-30 09:52:01] ch at westend dot com As of SVN revision 315762 from now, the constant only appears in the tests, not in the class source. Running the tests yield to: Fatal error: Undefined class constant 'ERRNO_OID_PARSING_ERROR' in /home/chammers/workspace/php-src-5.4/ext/snmp/tests/snmp-object-errno-errstr.php on line 45 Maybe it's not yet committet? [2011-08-30 09:42:08] lytbo...@php.net Please check that you have ERRNO_OID_PARSING_ERROR in snmp extension sources. This constant appeared on 27th of august. [2011-08-30 09:21:17] ch at westend dot com The idea sounds good but it does not seem to work. The "Invalid object identifier" is thrown only as PHP Warning, not set in SNMP->error: $ cat test.php get(array($oid1, $oid2, $oid3)); printf("---\n%s (%d)\n\n", $snmp->getError(), $snmp->errno); $ ../php-src-5.4/sapi/cli/php -d include_path=.:/usr/share/php test.php Warning: SNMP::get(): Invalid object identifier: DOES-NOT-EXIST-MIB::FOO in /home/chammers/workspace/php_test/test.php on line 8 --- (0) [2011-08-27 08:54:31] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Please try another approach: all methods that performs remote agent query raise $object->errno == SNMP::ERRNO_OID_PARSING_ERROR even before query itself, indicating that some of OID (and/or type for set method) was not parsed correctly. Since OO API allows to set multiple OID on single method call this should help. Mind that OID parsing is made in chunks with length of $object->max_oids. Thus if you supply array of OIDs that is bigger than $object->max_oids and bogus OID will be in the end of array, this error will be raised *after* processing (e.g. making query) the first part. [2007-03-15 11:05:51] ch at westend dot com Description: Hello Please make a PHP pendant to /usr/bin/snmptranslate. It's handy to check if all MIBs are installed so that the program does not crash somewhere after already having set the first X OIDs and then encountering one untranslatable. bye, -christian- Reproduce code: --- - Expected result: - Actual result: -- - -- Edit this bug report at https://bugs.php.net/bug.php?id=40816&edit=1
Req #40816 [Asn->Fbk]: Add "snmptranslate" function
Edit report at https://bugs.php.net/bug.php?id=40816&edit=1 ID: 40816 Updated by: lytbo...@php.net Reported by:ch at westend dot com Summary:Add "snmptranslate" function -Status: Assigned +Status: Feedback Type: Feature/Change Request Package:SNMP related Operating System: linux PHP Version:5.2.1 Assigned To: lytboris Block user comment: N Private report: N New Comment: Please check that you have ERRNO_OID_PARSING_ERROR in snmp extension sources. This constant appeared on 27th of august. Previous Comments: [2011-08-30 09:21:17] ch at westend dot com The idea sounds good but it does not seem to work. The "Invalid object identifier" is thrown only as PHP Warning, not set in SNMP->error: $ cat test.php get(array($oid1, $oid2, $oid3)); printf("---\n%s (%d)\n\n", $snmp->getError(), $snmp->errno); $ ../php-src-5.4/sapi/cli/php -d include_path=.:/usr/share/php test.php Warning: SNMP::get(): Invalid object identifier: DOES-NOT-EXIST-MIB::FOO in /home/chammers/workspace/php_test/test.php on line 8 --- (0) [2011-08-27 08:54:31] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Please try another approach: all methods that performs remote agent query raise $object->errno == SNMP::ERRNO_OID_PARSING_ERROR even before query itself, indicating that some of OID (and/or type for set method) was not parsed correctly. Since OO API allows to set multiple OID on single method call this should help. Mind that OID parsing is made in chunks with length of $object->max_oids. Thus if you supply array of OIDs that is bigger than $object->max_oids and bogus OID will be in the end of array, this error will be raised *after* processing (e.g. making query) the first part. [2007-03-15 11:05:51] ch at westend dot com Description: Hello Please make a PHP pendant to /usr/bin/snmptranslate. It's handy to check if all MIBs are installed so that the program does not crash somewhere after already having set the first X OIDs and then encountering one untranslatable. bye, -christian- Reproduce code: --- - Expected result: - Actual result: -- - -- Edit this bug report at https://bugs.php.net/bug.php?id=40816&edit=1
Req #40816 [Opn->Fbk]: Add "snmptranslate" function
Edit report at https://bugs.php.net/bug.php?id=40816&edit=1 ID: 40816 Updated by: lytbo...@php.net Reported by:ch at westend dot com Summary:Add "snmptranslate" function -Status: Open +Status: Feedback Type: Feature/Change Request Package:SNMP related Operating System: linux PHP Version:5.2.1 -Assigned To: +Assigned To: lytboris Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Please try another approach: all methods that performs remote agent query raise $object->errno == SNMP::ERRNO_OID_PARSING_ERROR even before query itself, indicating that some of OID (and/or type for set method) was not parsed correctly. Since OO API allows to set multiple OID on single method call this should help. Mind that OID parsing is made in chunks with length of $object->max_oids. Thus if you supply array of OIDs that is bigger than $object->max_oids and bogus OID will be in the end of array, this error will be raised *after* processing (e.g. making query) the first part. Previous Comments: [2007-03-15 11:05:51] ch at westend dot com Description: Hello Please make a PHP pendant to /usr/bin/snmptranslate. It's handy to check if all MIBs are installed so that the program does not crash somewhere after already having set the first X OIDs and then encountering one untranslatable. bye, -christian- Reproduce code: --- - Expected result: - Actual result: -- - -- Edit this bug report at https://bugs.php.net/bug.php?id=40816&edit=1
Req #42918 [Fbk->Csd]: IPv6 addresses not supported in SNMP extension
Edit report at https://bugs.php.net/bug.php?id=42918&edit=1 ID: 42918 Updated by: lytbo...@php.net Reported by:estesp at fastmail dot us Summary:IPv6 addresses not supported in SNMP extension -Status: Feedback +Status: Closed Type: Feature/Change Request Package:SNMP related -Operating System: Linux +Operating System: * PHP Version:5CVS-2007-10-10 (snap) Assigned To:lytboris Block user comment: N Private report: N Previous Comments: [2011-08-22 05:52:54] lytbo...@php.net There is IPv6 test both in trunk and PHP_5_4, revs 315236, 315237 already. [2011-08-21 23:35:37] c...@php.net The following patch has been added/updated: Patch Name: php_bug42918.diff Revision: 1313969737 URL: https://bugs.php.net/patch-display.php?bug=42918&patch=php_bug42918.diff&revision=1313969737 [2011-08-21 23:34:20] c...@php.net Now it works, thanks! Attached you find a diff that adds two basic tests for "udp6[::1]" as hostname. [2011-08-20 20:55:55] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315245 Log: IPv6 Support for SNMP. (FR #42918) [2011-08-20 16:24:43] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=42918 -- Edit this bug report at https://bugs.php.net/bug.php?id=42918&edit=1
Bug #47659 [Opn->Csd]: SNMP Builds with Obsolete UCD-SNMP
Edit report at https://bugs.php.net/bug.php?id=47659&edit=1 ID: 47659 Updated by: lytbo...@php.net Reported by:larryjadams at comcast dot net Summary:SNMP Builds with Obsolete UCD-SNMP -Status: Open +Status: Closed Type: Bug Package:SNMP related Operating System: win32 only PHP Version:5.2.9 -Assigned To: +Assigned To:lytboris Block user comment: N Private report: N New Comment: Thank you for your bug report. This issue has already been fixed in the latest released version of PHP, which you can download at http://www.php.net/downloads.php Previous Comments: [2011-08-23 12:15:15] larryjadams at comcast dot net Boris, This issue has been fixed in 5.3. So, I think we can close it. Philippe had committed my changes SVN. Do the check just to make sure. Regards, Larry Adams [2011-08-20 16:28:38] lytbo...@php.net Is this still a pressing problem? [2009-03-14 20:54:30] larryjadams at comcast dot net --- snmp.dsp2004-01-17 06:59:48.0 -0500 +++ patches/snmp.dsp2009-03-14 16:37:56.267879800 -0400 @@ -54,7 +54,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib libsnmp.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_snmp.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib libsnmp.lib netsnmp.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_snmp.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" !ELSEIF "$(CFG)" == "snmp - Win32 Debug_TS" @@ -81,7 +81,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts_debug.lib libsnmp.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Debug_TS/php_snmp.dll" /libpath:"..\..\Debug_TS" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts_debug.lib libsnmp.lib netsnmp.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Debug_TS/php_snmp.dll" /libpath:"..\..\Debug_TS" !ENDIF --- config.w32 2003-12-19 11:00:10.0 -0500 +++ patches/config.w32 2009-03-14 16:38:00.731879800 -0400 @@ -4,13 +4,17 @@ ARG_WITH("snmp", "SNMP support", "no"); if (PHP_SNMP != "no") { - - if (CHECK_HEADER_ADD_INCLUDE("snmp.h", "CFLAGS_SNMP", PHP_PHP_BUILD + "\\include\\ucd-snmp;" + PHP_PHP_BUILD + "\\include\\net-snmp;" + PHP_SNMP) && - CHECK_LIB("libsnmp.lib", "snmp", PHP_SNMP)) { + if (CHECK_HEADER_ADD_INCLUDE("snmp.h", "CFLAGS_SNMP", PHP_PHP_BUILD + "\\include\\ucd-snmp;" + PHP_PHP_BUILD + "\\include\\net-snmp;" + PHP_SNMP)) { + if (CHECK_LIB("netsnmp.lib", "snmp", PHP_SNMP)) { EXTENSION('snmp', 'snmp.c'); - AC_DEFINE('HAVE_SNMP', 1); - + AC_DEFINE("HAVE_NET_SNMP", 1); + } else if (CHECK_LIB("libsnmp.lib", "snmp", PHP_SNMP)) { + EXTENSION('snmp', 'snmp.c'); + AC_DEFINE('HAVE_SNMP', 1); + } else { + WARNING("snmp not enabled; libraries and headers not found"); + } } else { WARNING("snmp not enabled; libraries and headers not found"); } [2009-03-14 20:49:00] larryjadams at comcast dot net Description: The SNMP Exten
Req #42918 [Fbk]: IPv6 addresses not supported in SNMP extension
Edit report at https://bugs.php.net/bug.php?id=42918&edit=1 ID: 42918 Updated by: lytbo...@php.net Reported by:estesp at fastmail dot us Summary:IPv6 addresses not supported in SNMP extension Status: Feedback Type: Feature/Change Request Package:SNMP related Operating System: Linux PHP Version:5CVS-2007-10-10 (snap) Assigned To:lytboris Block user comment: N Private report: N New Comment: There is IPv6 test both in trunk and PHP_5_4, revs 315236, 315237 already. Previous Comments: [2011-08-21 23:35:37] c...@php.net The following patch has been added/updated: Patch Name: php_bug42918.diff Revision: 1313969737 URL: https://bugs.php.net/patch-display.php?bug=42918&patch=php_bug42918.diff&revision=1313969737 [2011-08-21 23:34:20] c...@php.net Now it works, thanks! Attached you find a diff that adds two basic tests for "udp6[::1]" as hostname. [2011-08-20 20:55:55] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315245 Log: IPv6 Support for SNMP. (FR #42918) [2011-08-20 16:24:43] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2011-08-20 16:24:12] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315238 Log: document FR #55312, #42918 The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=42918 -- Edit this bug report at https://bugs.php.net/bug.php?id=42918&edit=1
Req #48430 [Fbk->Csd]: Missing snmpbulkset function
Edit report at https://bugs.php.net/bug.php?id=48430&edit=1 ID: 48430 Updated by: lytbo...@php.net Reported by:ch at lathspell dot de Summary:Missing snmpbulkset function -Status: Feedback +Status: Closed Type: Feature/Change Request Package:SNMP related PHP Version:5.2.9 Assigned To:lytboris Block user comment: N Private report: N Previous Comments: [2011-08-21 23:44:32] c...@php.net The OO API works great, good work, bug can be closed. [2011-08-21 08:04:47] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Try new OO API, it has bulk-set functionality. [2009-05-29 15:17:54] ch at lathspell dot de Description: There seems to be no "snmpset" function for sending multiple "OID type value" pairs in one PDU packet. Sadly some crappy hardware needs this. It is possible with /usr/bin/snmpset so the underlying Net-SNMP library can handle it. (It might be called snmp bulk set analog to "SNMP bulk get" but I'm not sure if that's the same) -- Edit this bug report at https://bugs.php.net/bug.php?id=48430&edit=1
Req #35855 [Opn->Fbk]: Patch to Build PHP_SNMP with NET-SNMP Support
Edit report at https://bugs.php.net/bug.php?id=35855&edit=1 ID: 35855 Updated by: lytbo...@php.net Reported by:larryjadams at comcast dot net Summary:Patch to Build PHP_SNMP with NET-SNMP Support -Status: Open +Status: Feedback Type: Feature/Change Request Package:SNMP related Operating System: Win32 PHP Version:5.1.1 -Assigned To: +Assigned To:lytboris Block user comment: N Private report: N New Comment: Is this still an pressing issue? Previous Comments: [2005-12-31 09:11:59] larryjadams at comcast dot net Here are the two patch files: http://home.comcast.net/~larryjadams/config.w32.patch http://home.comcast.net/~larryjadams/snmp.dsp.patch Thanks!! [2005-12-30 22:36:55] larryjadams at comcast dot net Patch for snmp.dsp: --- snmp.dsp2005-12-27 17:21:19.31250 -0500 +++ Backup/snmp.dsp 2004-01-17 07:59:48.0 -0500 @@ -54,7 +54,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib libsnmp.lib netsnmp.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_snmp.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib libsnmp.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_snmp.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" !ELSEIF "$(CFG)" == "snmp - Win32 Debug_TS" @@ -81,7 +81,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts_debug.lib libsnmp.lib netsnmp.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Debug_TS/php_snmp.dll" /libpath:"..\..\Debug_TS" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts_debug.lib libsnmp.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Debug_TS/php_snmp.dll" /libpath:"..\..\Debug_TS" !ENDIF Patch for config.w32: --- config.w32 2005-12-30 16:19:21.28125 -0500 +++ Backup/config.w32 2003-12-19 12:00:10.0 -0500 @@ -4,18 +4,13 @@ ARG_WITH("snmp", "SNMP support", "no"); if (PHP_SNMP != "no") { - if (CHECK_HEADER_ADD_INCLUDE("snmp.h", "CFLAGS_SNMP", PHP_PHP_BUILD + "\\include\\ucd-snmp;" + PHP_PHP_BUILD + "\\include\\net-snmp;" + PHP_SNMP)) { - if (CHECK_LIB("netsnmp.lib", "snmp", PHP_SNMP)) { - EXTENSION('snmp', 'snmp.c'); - AC_DEFINE('HAVE_SNMP', 1); - AC_DEFINE('HAVE_NET_SNMP', 1); - AC_DEFINE('MSVC_PERL', 1); - } else if (CHECK_LIB("libsnmp.lib", "snmp", PHP_SNMP)) { + + if (CHECK_HEADER_ADD_INCLUDE("snmp.h", "CFLAGS_SNMP", PHP_PHP_BUILD + "\\include\\ucd-snmp;" + PHP_PHP_BUILD + "\\include\\net-snmp;" + PHP_SNMP) && + CHECK_LIB("libsnmp.lib", "snmp", PHP_SNMP)) { EXTENSION('snmp', 'snmp.c'); + AC_DEFINE('HAVE_SNMP', 1); - } else { - WARNING("snmp not enabled; libraries and headers not found"); - } + } else { WARNING("snmp not enabled; libraries and headers not found"); } [2005-12-30 22:26:40] larryjadams at comcast dot net Description: The current "Windows" version of the php_snmp extension is built with the undersupported ucd-snmp libraries. There are several issues continuing to utilize the u
Req #48430 [Opn->Fbk]: Missing snmpbulkset function
Edit report at https://bugs.php.net/bug.php?id=48430&edit=1 ID: 48430 Updated by: lytbo...@php.net Reported by:ch at lathspell dot de Summary:Missing snmpbulkset function -Status: Open +Status: Feedback Type: Feature/Change Request -Package:Feature/Change Request +Package:*General Issues PHP Version:5.2.9 -Assigned To: +Assigned To:lytboris Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Try new OO API, it has bulk-set functionality. Previous Comments: [2009-05-29 15:17:54] ch at lathspell dot de Description: There seems to be no "snmpset" function for sending multiple "OID type value" pairs in one PDU packet. Sadly some crappy hardware needs this. It is possible with /usr/bin/snmpset so the underlying Net-SNMP library can handle it. (It might be called snmp bulk set analog to "SNMP bulk get" but I'm not sure if that's the same) -- Edit this bug report at https://bugs.php.net/bug.php?id=48430&edit=1
Req #31772 [Fbk->Csd]: [PATCH] Net-SNMP 5.2.x ++ Workaround in PHP_SNMP Incorrectly Coded
Edit report at https://bugs.php.net/bug.php?id=31772&edit=1 ID: 31772 Updated by: lytbo...@php.net Reported by:har...@php.net Summary:[PATCH] Net-SNMP 5.2.x ++ Workaround in PHP_SNMP Incorrectly Coded -Status: Feedback +Status: Closed Type: Feature/Change Request Package:SNMP related Operating System: Win32 PHP Version:5.0.3 Assigned To:lytboris Block user comment: N Private report: N Previous Comments: [2011-08-21 07:03:54] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Solved adding OO API [2005-03-16 14:02:29] har...@php.net Harrie, Per my e-mail, I have patch code that performs the exact thing. Only question to remain is do we want the default walk behavior to be "bulk" when performing snmpv2 calls? I would suggest that we hold off on "bulk" get's until a later date. Please let me know. Larry [2005-03-16 13:52:40] har...@php.net As for creating a set_version function this is not useful if in a single PHP script multiple SNMP versions are needed. This is not that unlikely if one wants to access more then one single SNMP agent. A better solution would be to setup a SNMP session and use this struct as the argument for SNMP retrieval functions. But since backwards compatibility seems an issue the solution of adding version specific functions is easier. Maybe even clearer to a user (PHP programmer). [2005-03-16 13:47:39] har...@php.net I do not see this patch as the correct solution. It duplicates the same function of parsing the SNMPv1 arguments with the exception of the version itself. Therefore, a proper solution would be to add a version parameter to the parsing of the SNMPv1 arguments and use that to configure the version. This avoids the duplicated code where the handling of SNMPv1 and SNMPv2c (both community based) are simply equal except the version number. [2005-03-06 20:39:11] LarryJAdams at comcast dot net I had the same question for Harrie (one of the authors) and he did not want to go that way. However, there is another workaround that was sent to me by another user that could be incorporated except for the "bulk" operations. Either way, this code works and the SNMPv3 is so different anyway, we can't go down to one function easily. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=31772 -- Edit this bug report at https://bugs.php.net/bug.php?id=31772&edit=1
Req #31772 [Opn->Fbk]: [PATCH] Net-SNMP 5.2.x ++ Workaround in PHP_SNMP Incorrectly Coded
Edit report at https://bugs.php.net/bug.php?id=31772&edit=1 ID: 31772 Updated by: lytbo...@php.net Reported by:har...@php.net Summary:[PATCH] Net-SNMP 5.2.x ++ Workaround in PHP_SNMP Incorrectly Coded -Status: Open +Status: Feedback Type: Feature/Change Request Package:SNMP related Operating System: Win32 PHP Version:5.0.3 Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Solved adding OO API Previous Comments: [2005-03-16 14:02:29] har...@php.net Harrie, Per my e-mail, I have patch code that performs the exact thing. Only question to remain is do we want the default walk behavior to be "bulk" when performing snmpv2 calls? I would suggest that we hold off on "bulk" get's until a later date. Please let me know. Larry [2005-03-16 13:52:40] har...@php.net As for creating a set_version function this is not useful if in a single PHP script multiple SNMP versions are needed. This is not that unlikely if one wants to access more then one single SNMP agent. A better solution would be to setup a SNMP session and use this struct as the argument for SNMP retrieval functions. But since backwards compatibility seems an issue the solution of adding version specific functions is easier. Maybe even clearer to a user (PHP programmer). [2005-03-16 13:47:39] har...@php.net I do not see this patch as the correct solution. It duplicates the same function of parsing the SNMPv1 arguments with the exception of the version itself. Therefore, a proper solution would be to add a version parameter to the parsing of the SNMPv1 arguments and use that to configure the version. This avoids the duplicated code where the handling of SNMPv1 and SNMPv2c (both community based) are simply equal except the version number. [2005-03-06 20:39:11] LarryJAdams at comcast dot net I had the same question for Harrie (one of the authors) and he did not want to go that way. However, there is another workaround that was sent to me by another user that could be incorporated except for the "bulk" operations. Either way, this code works and the SNMPv3 is so different anyway, we can't go down to one function easily. [2005-03-06 17:40:06] sni...@php.net What's wrong with adding something like 'snmp_set_version()' func instead of having separate functions for v1/v2/v3 ??? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=31772 -- Edit this bug report at https://bugs.php.net/bug.php?id=31772&edit=1
Bug #47659 [Opn->Fbk]: SNMP Builds with Obsolete UCD-SNMP
Edit report at https://bugs.php.net/bug.php?id=47659&edit=1 ID: 47659 Updated by: lytbo...@php.net Reported by:larryjadams at comcast dot net Summary:SNMP Builds with Obsolete UCD-SNMP -Status: Open +Status: Feedback Type: Bug Package:SNMP related Operating System: win32 only PHP Version:5.2.9 Block user comment: N Private report: N New Comment: Is this still a pressing problem? Previous Comments: [2009-03-14 20:54:30] larryjadams at comcast dot net --- snmp.dsp2004-01-17 06:59:48.0 -0500 +++ patches/snmp.dsp2009-03-14 16:37:56.267879800 -0400 @@ -54,7 +54,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib libsnmp.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_snmp.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib libsnmp.lib netsnmp.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_snmp.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" !ELSEIF "$(CFG)" == "snmp - Win32 Debug_TS" @@ -81,7 +81,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts_debug.lib libsnmp.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Debug_TS/php_snmp.dll" /libpath:"..\..\Debug_TS" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts_debug.lib libsnmp.lib netsnmp.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Debug_TS/php_snmp.dll" /libpath:"..\..\Debug_TS" !ENDIF --- config.w32 2003-12-19 11:00:10.0 -0500 +++ patches/config.w32 2009-03-14 16:38:00.731879800 -0400 @@ -4,13 +4,17 @@ ARG_WITH("snmp", "SNMP support", "no"); if (PHP_SNMP != "no") { - - if (CHECK_HEADER_ADD_INCLUDE("snmp.h", "CFLAGS_SNMP", PHP_PHP_BUILD + "\\include\\ucd-snmp;" + PHP_PHP_BUILD + "\\include\\net-snmp;" + PHP_SNMP) && - CHECK_LIB("libsnmp.lib", "snmp", PHP_SNMP)) { + if (CHECK_HEADER_ADD_INCLUDE("snmp.h", "CFLAGS_SNMP", PHP_PHP_BUILD + "\\include\\ucd-snmp;" + PHP_PHP_BUILD + "\\include\\net-snmp;" + PHP_SNMP)) { + if (CHECK_LIB("netsnmp.lib", "snmp", PHP_SNMP)) { EXTENSION('snmp', 'snmp.c'); - AC_DEFINE('HAVE_SNMP', 1); - + AC_DEFINE("HAVE_NET_SNMP", 1); + } else if (CHECK_LIB("libsnmp.lib", "snmp", PHP_SNMP)) { + EXTENSION('snmp', 'snmp.c'); + AC_DEFINE('HAVE_SNMP', 1); + } else { + WARNING("snmp not enabled; libraries and headers not found"); + } } else { WARNING("snmp not enabled; libraries and headers not found"); } [2009-03-14 20:49:00] larryjadams at comcast dot net Description: The SNMP Extension builds with UCD-SNMP which has been obsolete for some time. I will attach a patch that will correct this behavior. Please note that the build source will require a recent version of netsnmp.lib to build properly. Reproduce code: --- Not required. Will provide patch. However, if you run phpinfo(), it reports UCD-SNMP. Expected result: NET-SNMP Actual result: -- UCD-SNMP -- Edit this bug report at https://bugs.php.net/bug.php?id=47659&edit=1
Req #42918 [Asn->Fbk]: IPv6 addresses not supported in SNMP extension
Edit report at https://bugs.php.net/bug.php?id=42918&edit=1 ID: 42918 Updated by: lytbo...@php.net Reported by:estesp at fastmail dot us Summary:IPv6 addresses not supported in SNMP extension -Status: Assigned +Status: Feedback Type: Feature/Change Request Package:SNMP related Operating System: Linux PHP Version:5CVS-2007-10-10 (snap) Assigned To:lytboris Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2011-08-20 16:24:12] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315238 Log: document FR #55312, #42918 [2011-08-20 16:10:41] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315237 Log: merge from trunk two commits: Adding IPv6 support (FR #42918) more code coverage [2011-08-20 15:53:36] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315236 Log: Adding IPv6 support (FR #42918) [2011-07-29 01:17:55] c...@php.net Ping! This is 2011 and IPv6 spreading! Fixing this issue shouldn't be very hard as the underlying Net_SNMP library already supports IPv6: $ snmpwalk -v 2c -c public 'udp6:[::1]' sysname SNMPv2-MIB::sysName.0 = STRING: james $ snmpwalk -v 2c -c public 'udp6:::1' sysname SNMPv2-MIB::sysName.0 = STRING: james For testing the following hast to be put into /etc/snmp/snmpd.conf: agentAddress udp:127.0.0.1:161,udp6:[::1]:161 rwcommunity6 private ::1 rocommunity6 public ::1 Currently PHP still gives the following error: $ ~/workspace/php-src-5.4/sapi/cli/php -r 'echo snmpget("::1", "private", "IF-MIB::ifAlias.1");' Warning: snmpget(): Could not open snmp connection: Unknown host (::1) (Illegal seek) in Command line code on line 1 Different formats like "[::1]:161" or "::1:161" make no difference. [2010-04-14 14:39:00] j dot ek at gmx dot net Actually the code mentioned above occurs two times. First time in function "php_snmpv3" (for SNMPv3) and second in "php_snmp" (for v1 and v2c). It also seems that some other things should be updated to support IPv6 addresses, e.g. not only support IpAddress SMIv2 Base Type but also the more generic address schema described in RFC3291. On the other hand I cannot say whether the net-snmp library already does support this, but as they claim to be fully IPv6 compatible, it's worth a try. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=42918 -- Edit this bug report at https://bugs.php.net/bug.php?id=42918&edit=1
Req #55312 [Wfx]: Please change SNMP::VERSION_ constants to sensible values
Edit report at https://bugs.php.net/bug.php?id=55312&edit=1 ID: 55312 Updated by: lytbo...@php.net Reported by:c...@php.net Summary:Please change SNMP::VERSION_ constants to sensible values Status: Wont fix Type: Feature/Change Request Package:SNMP related PHP Version:5.4.0alpha2 Assigned To:lytboris Block user comment: N Private report: N New Comment: That was quote from Net-SNMP sources, not php-snmp. Previous Comments: [2011-08-15 07:51:52] c...@php.net Why don't you just swap SNMP_VERSION_2c to "2" and SNMP_VERSION_2u to "1"? Then (accidently) specify "2" would lead to a sensible result. [2011-08-15 07:20:33] lytbo...@php.net There are some drawbacks. Look at this portion of code from snmp.h:#ifndef == NETSNMP_DISABLE_SNMPV1 #define SNMP_VERSION_1 0 #endif #ifndef NETSNMP_DISABLE_SNMPV2C #define SNMP_VERSION_2c1 #endif #define SNMP_VERSION_2u2/* not (will never be) supported by this code */ #define SNMP_VERSION_3 3 /* * versions not based on a version field */ #define SNMP_VERSION_sec 128 /* not (will never be) supported by this code */ #define SNMP_VERSION_2p129 /* no longer supported by this code (> 4.0) */ #define SNMP_VERSION_2star 130 /* not (will never be) supported by this code */ = There are 4 versions of protocol that are glued to major "second" version. I am not sure that any user specifying '2' in SNMP constructor call would mean 2c. I will fix constructor manual adding note that version parameter should be a SNMP class version constant and not an ordinary integer. [2011-07-28 23:26:50] c...@php.net Description: Currently the SNMP::VERSION class constants have the following internal values: const integer SNMP::VERSION_1 = 0 ; const integer SNMP::VERSION_2C = 1 ; const integer SNMP::VERSION_2c = 1 ; const integer SNMP::VERSION_3 = 3 ; As PHP does not yet have the concept of Enums the documentation just says that the first parameter has to be numeric so people will be tempted to enter 1, 2 or 3 as paramter which results in hard to debug errors (it mostly works just some OIDs do not). Would there be any drawbacks if we change the internal values to 1, 2, 2, 3? It's still Alpha so no Backward Compatibility problems. -- Edit this bug report at https://bugs.php.net/bug.php?id=55312&edit=1
Req #55312 [Opn->Wfx]: Please change SNMP::VERSION_ constants to sensible values
Edit report at https://bugs.php.net/bug.php?id=55312&edit=1 ID: 55312 Updated by: lytbo...@php.net Reported by:c...@php.net Summary:Please change SNMP::VERSION_ constants to sensible values -Status: Open +Status: Wont fix Type: Feature/Change Request Package:SNMP related PHP Version:5.4.0alpha2 -Assigned To: +Assigned To:lytboris Block user comment: N Private report: N New Comment: There are some drawbacks. Look at this portion of code from snmp.h:#ifndef == NETSNMP_DISABLE_SNMPV1 #define SNMP_VERSION_1 0 #endif #ifndef NETSNMP_DISABLE_SNMPV2C #define SNMP_VERSION_2c1 #endif #define SNMP_VERSION_2u2/* not (will never be) supported by this code */ #define SNMP_VERSION_3 3 /* * versions not based on a version field */ #define SNMP_VERSION_sec 128 /* not (will never be) supported by this code */ #define SNMP_VERSION_2p129 /* no longer supported by this code (> 4.0) */ #define SNMP_VERSION_2star 130 /* not (will never be) supported by this code */ = There are 4 versions of protocol that are glued to major "second" version. I am not sure that any user specifying '2' in SNMP constructor call would mean 2c. I will fix constructor manual adding note that version parameter should be a SNMP class version constant and not an ordinary integer. Previous Comments: [2011-07-28 23:26:50] c...@php.net Description: Currently the SNMP::VERSION class constants have the following internal values: const integer SNMP::VERSION_1 = 0 ; const integer SNMP::VERSION_2C = 1 ; const integer SNMP::VERSION_2c = 1 ; const integer SNMP::VERSION_3 = 3 ; As PHP does not yet have the concept of Enums the documentation just says that the first parameter has to be numeric so people will be tempted to enter 1, 2 or 3 as paramter which results in hard to debug errors (it mostly works just some OIDs do not). Would there be any drawbacks if we change the internal values to 1, 2, 2, 3? It's still Alpha so no Backward Compatibility problems. -- Edit this bug report at https://bugs.php.net/bug.php?id=55312&edit=1
Req #54502 [Fbk->Csd]: Add support for the "BITS" datatype
Edit report at https://bugs.php.net/bug.php?id=54502&edit=1 ID: 54502 Updated by: lytbo...@php.net Reported by:c...@php.net Summary:Add support for the "BITS" datatype -Status: Feedback +Status: Closed Type: Feature/Change Request Package:SNMP related PHP Version:trunk-SVN-2011-04-10 (SVN) Assigned To: lytboris Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. It seems that parseBitName should not go into php-snmp library, at least it works only for "BITS: " string. Not sure that general parsing function will be sufficient for all users though, not taking into account the fact that this function will be complicated. As an example of such complicated function you may take a look on format_snmp_string() function in Cacti's repo lib/snmp.php [ http://svn.cacti.net/viewvc/cacti/branches/0.8.7/lib/snmp.php?view=log ]. Previous Comments: [2011-07-29 00:27:25] c...@php.net The new default SNMP->valueretrieval = SNMP_VALUE_LIBRARY gives at least the amount of information that snmpwalk does. Still, before you close this bug, please consider at least adding something like the following method. It would add a bit of the convenience that one expects from a PHP class while still leave the low-level methods untouched. /** Returns the name of a bit value. * * The NetSNMP library returns values of OIDs of the BIT type like * "BITS: 80 notification(0)". This method can be used to extract * just the name "notification" from this output. * * @param string $raw_value The return of a walk() or get() request. * @return string The name of the BIT value. */ public static function parseBitName($raw_value) { preg_match('/^BITS: [0-9a-f]+ (.*)\(\d+\)\s+$/i', $raw_value, $match); if (!isset($match[1])) { throw new Exception("Cannot parse BIT value from '$raw_value'!"); } return $match[1]; } ---- [2011-07-17 13:26:55] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=31 Log: fix FR #54502: allow user to change OID value output mode when SNMP_VALUE_OBJECT is used. [2011-07-17 13:25:30] lytbo...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Now you can combine SNMP_VALUE_OBJECT with one of SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY to alter 'value' output mode. As for >The value is not even numerical, it has to be converted to 0x80 using >bin2hex()! This is normal, because this is exactly what php-snmp receives from remote SNMP agent. ---- [2011-07-17 13:18:27] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=313331 Log: fix FR #54502: allow user to change OID value output mode when SNMP_VALUE_OBJECT is used. [2011-07-17 09:18:04] lytbo...@php.net There is support for BITS datatype actually when SNMP_VALUE_LIBRARY is enabled for value processing. When you enable other SNMP_VALUE_* modes no value processing is performed and output from remote SNMP agent is passed through SNMP library. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=54502 -- Edit this bug report at https://bugs.php.net/bug.php?id=54502&edit=1
Bug #54111 [Asn->Bgs]: read_mib does not return correct response
Edit report at https://bugs.php.net/bug.php?id=54111&edit=1 ID: 54111 Updated by: lytbo...@php.net Reported by:jthijsse at noxlogic dot nl Summary:read_mib does not return correct response -Status: Assigned +Status: Bogus Type: Bug Package:SNMP related Operating System: * PHP Version:Irrelevant Assigned To:lytboris Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php snmp_read_mib(): this is a Net-SNMP library bug, not php-snmp: read_module_internal() should return some error if parse(fp, NULL) returned NULL. And for logging facility you may open a new bug report and attach the patch you propose. Previous Comments: [2011-02-27 18:04:32] jthijsse at noxlogic dot nl Description: snmp_read_mib() returns a boolean depending on success of the read. Internally, the reab_mib() call returns either NULL or the root of the mib-tree, depending on succes. This problem here is that read_mib ONLY returns NULL when the mib-file is not found and not when there is a parse-error inside the file. In that case it will just return the mib root tree (which is !null) and thus it will return true back to the php user. As a sidenote (maybe a different bug): snmp_disable_stderrlog() does not work 100% for disabling snmp error logging. Net-snmp wants at least 1 type of log handler active at all times. A simple fix would be to add snmp_enable_calllog(), so it would use the callback handler for logging (and since there are no handlers registered, no logging would occur). It would be nicer though to actually have a callback registered which can return info back to php level (snmp_[clear|get]_log for instance). The code for this functional and can be supplied as a patch against php5.3 and the new OO api in trunk. Test script: --- var_dump(snmp_read_mib("cannotfindthisfile")); var_dump(snmp_read_mib("incorrectmibfile")); Expected result: bool(false) bool(false) Actual result: -- bool(false) Warning: snmp_read_mib(): Error while reading MIB file '%s': No such file or directory in %s on line %d bool(true) -- Edit this bug report at https://bugs.php.net/bug.php?id=54111&edit=1
Req #54378 [Opn->Fbk]: Expose snmp_in/out/mib_toggle_options()
Edit report at https://bugs.php.net/bug.php?id=54378&edit=1 ID: 54378 Updated by: lytbo...@php.net Reported by:ch at lathspell dot de Summary:Expose snmp_in/out/mib_toggle_options() -Status: Open +Status: Feedback Type: Feature/Change Request Package:SNMP related PHP Version:trunk-SVN-2011-03-24 (SVN) Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ I've added noOIDIncreasingCheck property. When set to true, walk method works exactly as snmpwalk with -Cc flag. Previous Comments: [2011-03-24 22:30:27] ch at lathspell dot de Description: The snmpcmd(1) man page lists a lot of options, some of them should probably be better done in PHP but some, like -Pc or -Cc could be necessary in rare cases. An alternative would be to expose the "-Y" function netsnmp_config_remember(). Of course it should be documented that these function alter the global behaviour and not just the current session. Also that they are Net-SNMP specific. Test script: --- - Expected result: - Actual result: -- - -- Edit this bug report at https://bugs.php.net/bug.php?id=54378&edit=1
Req #54502 [Asn->Fbk]: Add support for the "BITS" datatype
Edit report at https://bugs.php.net/bug.php?id=54502&edit=1 ID: 54502 Updated by: lytbo...@php.net Reported by:c...@php.net Summary:Add support for the "BITS" datatype -Status: Assigned +Status: Feedback Type: Feature/Change Request Package:SNMP related PHP Version:trunk-SVN-2011-04-10 (SVN) Assigned To: lytboris Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Now you can combine SNMP_VALUE_OBJECT with one of SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY to alter 'value' output mode. As for >The value is not even numerical, it has to be converted to 0x80 using >bin2hex()! This is normal, because this is exactly what php-snmp receives from remote SNMP agent. Previous Comments: [2011-07-17 13:18:27] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=313331 Log: fix FR #54502: allow user to change OID value output mode when SNMP_VALUE_OBJECT is used. [2011-07-17 09:18:04] lytbo...@php.net There is support for BITS datatype actually when SNMP_VALUE_LIBRARY is enabled for value processing. When you enable other SNMP_VALUE_* modes no value processing is performed and output from remote SNMP agent is passed through SNMP library. [2011-04-10 15:34:01] c...@php.net Description: The SNMP command line tools are able to translate the numeric return values for OIDs of the "BITS" datatype back to meaningful string values by parsing the relevant parts of the MIB. The PHP functions currently seem unable to do that. I.e. in the following example I would like to get the string "notification" or "set" as return value but only get "0" or "1". As there is no other method to find and parse the MIB I'm left with hardcoding the values in the PHP script: $ snmptranslate -Td DISMAN-EVENT-MIB::mteEventActions DISMAN-EVENT-MIB::mteEventActions mteEventActions OBJECT-TYPE -- FROM DISMAN-EVENT-MIB SYNTAXBITS {notification(0), set(1)} Test script: --- >From commandline (mind the strange quotes, they're neccessary!): $ snmpwalk -v2c -c private localhost "DISMAN-EVENT-MIB::mteEventActions.\"_snmpd\".'_linkDown'" DISMAN-EVENT-MIB::mteEventActions."_snmpd".'_linkDown' = BITS: 80 notification(0) With PHP: snmp_set_valueretrieval(SNMP_VALUE_OBJECT); $snmp = new SNMP(SNMP_VERSION_2C, 'localhost', 'private'); $x = $snmp->get("DISMAN-EVENT-MIB::mteEventActions.\"_snmpd\".'_linkDown'"); var_dump($x); var_dump(bin2hex($x->value)); I get: object(stdClass)#190 (2) { ["type"]=> int(4) ["value"]=> string(1) "�" } string(2) "80" The value is not even numerical, it has to be converted to 0x80 using bin2hex()! Expected result: Maybe * the SNMP_VALUE_OBJECT representation object can be enhanced to include alternative representations: object(stdClass)#190 (2) { ["type"]=> int(4) ["value"]=> string(1) "�" ["bits_value"]=> string(15) "notification(0)" } * or the the snmp_set_enum_print() function is used to toggle BITS, too * or a snmp_set_bits_print() function is introduced * or a snmp_translate() function is introduced that returns the "snmptranslate" output as PHP data structure -- Edit this bug report at https://bugs.php.net/bug.php?id=54502&edit=1
Bug #52077 [Fbk]: SNMP GET/WALK may hangs FOREVER
Edit report at https://bugs.php.net/bug.php?id=52077&edit=1 ID: 52077 Updated by: lytbo...@php.net Reported by:wajim at mail dot ru Summary:SNMP GET/WALK may hangs FOREVER Status: Feedback Type: Bug Package:SNMP related Operating System: Win XP SP3 PHP Version:5.2.13 Block user comment: N Private report: N New Comment: Try to use up-to-date Net-SNMP library and report results. UCD-SNMP library support is dropped in PHP 5.4. Previous Comments: [2010-06-19 15:59:57] wajim at mail dot ru In net-snmp bugtracker I yet did not write. [2010-06-19 15:31:47] paj...@php.net did you send a patch to the ucd-snmp maintainers? If your patch is accepted I can then patch our builds, and it will be fixed for the next 5.3.x release (can't and won't touch snmp in 5.2 touch). [2010-06-19 15:13:44] wajim at mail dot ru static int _sess_read(void *sessp, fd_set *fdset){ [cut] unsigned long unblock; //WAJIM [cut] unblock = 1; ioctlsocket(isp->sd, FIONBIO, &unblock); //WAJIM length = recvfrom(isp->sd, (char *)packet, PACKET_LENGTH, 0, (struct sockaddr *)&from, &fromlength); unblock = 0; ioctlsocket(isp->sd, FIONBIO, &unblock); //WAJIM [cut] } Those my 3 lines in snmp_api.c (ucd-snmp-4.2.7.1) fixes threads hanging. :-) [2010-06-19 15:03:22] larryjadams at comcast dot net Stupid WINSock does not support send and receive timeout socket options. It's a poorly implemented socket api. The net-snmp guys will have to implement with an alarm. It can not be solved here. But nice catch. [2010-06-13 21:41:34] wajim at mail dot ru Description: Under a heavy GET/WALK-ing (form localhost to localhost) php may hangs forever -> apache's threads becomes zombies with CLOSE_WAIT sates even all timeouts (php and apache) are elapsed many times. Call-stack of a one zombie-thread: ntoskrnl.exe!KiUnlockDispatcherDatabase+0x77 ntoskrnl.exe!KeSetEvent+0x74 ntoskrnl.exe!PspGetSetContextSpecialApc+0x4e ntoskrnl.exe!KiDeliverApc+0xb3 ntoskrnl.exe!KiSwapThread+0x64 ntoskrnl.exe!KeWaitForSingleObject+0x1c2 ntoskrnl.exe!NtWaitForSingleObject+0x9a ntoskrnl.exe!KiFastCallEntry+0xf8 ntdll.dll!KiFastSystemCallRet ntdll.dll!ZwWaitForSingleObject+0xc mswsock.dll!SockWaitForSingleObject+0x1a0 mswsock.dll!WSPRecvFrom+0x1f0 WS2_32.dll!recvfrom+0x89 php_snmp.dll!snmp_sess_read+0x21f php_snmp.dll!snmp_sess_read+0x10 php_snmp.dll!snmp_read+0x17 php_snmp.dll!snmp_synch_response_cb+0xe8 php_snmp.dll!snmp_synch_response+0x19 php_snmp.dll!php_snmp_internal+0x267 php_snmp.dll!php_snmp+0x6da php_snmp.dll!zif_snmp2_get+0x27 php5ts.dll!zend_do_fcall_common_helper_SPEC+0x7ab php5ts.dll!ZEND_DO_FCALL_SPEC_CONST_HANDLER+0xe5 php5ts.dll!execute+0x1c5 php5ts.dll!zend_do_fcall_common_helper_SPEC+0x8ca php5ts.dll!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+0x15 php5ts.dll!execute+0x1c5 php5ts.dll!zend_do_fcall_common_helper_SPEC+0x8ca php5ts.dll!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+0x15 php5ts.dll!execute+0x1c5 php5ts.dll!zend_execute_scripts+0x107 php5ts.dll!php_execute_script+0x21d php5apache.dll!apache_php_module_main+0x91 php5apache.dll!send_php+0x265 php5apache.dll!send_parsed_php+0x10 ApacheCore.dll!ap_invoke_handler+0x87 ApacheCore.dll!ap_process_request+0x2b4 ApacheCore.dll!ap_process_request+0x26 ApacheCore.dll!ap_start_restart+0x37f WS2_32.dll!WSASocketW+0x119 IMHO bad call "WS2_32.dll!recvfrom" in buggy ucd-snmp library may hangs. There are no socket option like "setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, ..." before recvfrom call. -- Edit this bug report at https://bugs.php.net/bug.php?id=52077&edit=1
Req #54502 [Opn]: Add support for the "BITS" datatype
Edit report at https://bugs.php.net/bug.php?id=54502&edit=1 ID: 54502 Updated by: lytbo...@php.net Reported by:c...@php.net Summary:Add support for the "BITS" datatype Status: Open Type: Feature/Change Request Package:SNMP related PHP Version:trunk-SVN-2011-04-10 (SVN) -Assigned To: +Assigned To: lytboris Block user comment: N Private report: N New Comment: There is support for BITS datatype actually when SNMP_VALUE_LIBRARY is enabled for value processing. When you enable other SNMP_VALUE_* modes no value processing is performed and output from remote SNMP agent is passed through SNMP library. Previous Comments: [2011-04-10 15:34:01] c...@php.net Description: The SNMP command line tools are able to translate the numeric return values for OIDs of the "BITS" datatype back to meaningful string values by parsing the relevant parts of the MIB. The PHP functions currently seem unable to do that. I.e. in the following example I would like to get the string "notification" or "set" as return value but only get "0" or "1". As there is no other method to find and parse the MIB I'm left with hardcoding the values in the PHP script: $ snmptranslate -Td DISMAN-EVENT-MIB::mteEventActions DISMAN-EVENT-MIB::mteEventActions mteEventActions OBJECT-TYPE -- FROM DISMAN-EVENT-MIB SYNTAXBITS {notification(0), set(1)} Test script: --- >From commandline (mind the strange quotes, they're neccessary!): $ snmpwalk -v2c -c private localhost "DISMAN-EVENT-MIB::mteEventActions.\"_snmpd\".'_linkDown'" DISMAN-EVENT-MIB::mteEventActions."_snmpd".'_linkDown' = BITS: 80 notification(0) With PHP: snmp_set_valueretrieval(SNMP_VALUE_OBJECT); $snmp = new SNMP(SNMP_VERSION_2C, 'localhost', 'private'); $x = $snmp->get("DISMAN-EVENT-MIB::mteEventActions.\"_snmpd\".'_linkDown'"); var_dump($x); var_dump(bin2hex($x->value)); I get: object(stdClass)#190 (2) { ["type"]=> int(4) ["value"]=> string(1) "�" } string(2) "80" The value is not even numerical, it has to be converted to 0x80 using bin2hex()! Expected result: Maybe * the SNMP_VALUE_OBJECT representation object can be enhanced to include alternative representations: object(stdClass)#190 (2) { ["type"]=> int(4) ["value"]=> string(1) "�" ["bits_value"]=> string(15) "notification(0)" } * or the the snmp_set_enum_print() function is used to toggle BITS, too * or a snmp_set_bits_print() function is introduced * or a snmp_translate() function is introduced that returns the "snmptranslate" output as PHP data structure -- Edit this bug report at https://bugs.php.net/bug.php?id=54502&edit=1
Req #53594 [Tbd->Csd]: php-snmp rewrite
Edit report at http://bugs.php.net/bug.php?id=53594&edit=1 ID: 53594 Updated by: lytbo...@php.net Reported by:lytboris at gmail dot com Summary:php-snmp rewrite -Status: To be documented +Status: Closed Type: Feature/Change Request Package:SNMP related Operating System: irrelevant -PHP Version:trunk +PHP Version:5.4.0 Assigned To:lytboris Block user comment: N Private report: N Previous Comments: [2011-01-31 12:55:59] lytbo...@php.net OO API should be documented from scratch as most of old API functions [2011-01-31 12:41:36] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=307877 Log: Improved SNMP extension. FR #53594 [2011-01-05 19:04:56] lytboris at gmail dot com Introducing full-featured OO API. It covers bug #46065 also. Old API *_set_* functions actually sets `global' preferences, they are used when creating new object instance. $object->... properties are used object(session)-wise. [2010-12-31 19:52:07] lytboris at gmail dot com OK. There will be full-featured OO API without adding new functions into legacy API (e.g. no session support). Though old functions will be provided with two features (in sake of code cimplicity): * multi-OID * strict output typing [2010-12-29 18:22:55] paj...@php.net No need to deprecate it, but tell anyone asking for a feature for the legacy API to migrate to the new shiny one :) The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=53594 -- Edit this bug report at http://bugs.php.net/bug.php?id=53594&edit=1
Req #37865 [Opn->Csd]: The SNMP extension does not support setting multiple OIDs
Edit report at http://bugs.php.net/bug.php?id=37865&edit=1 ID: 37865 Updated by: lytbo...@php.net Reported by:lee dot duncan at intel dot com Summary:The SNMP extension does not support setting multiple OIDs -Status: Open +Status: Closed Type: Feature/Change Request Package:SNMP related Operating System: SUSE, Kernel 2.6.8-24.21-smp PHP Version:5.1.4 -Assigned To: +Assigned To:lytboris Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. fixed as a part of new OO API. Previous Comments: [2010-08-11 10:00:53] saimoun at saimoun dot fr Sorry, my patch did not work. I add a new version, and this version works perfectly, I have made many tests on it. [2010-07-28 12:01:29] saimoun at saimoun dot fr Hello :) I added my patch, it just contains a function, "snmp3_mset", which has the same prototype that snmp2_set_arr (function of eqguy2002). For SNMP version 1 and 2 you can easily adapt source code by modifying the beginning of the function snmp3_mset. For apply patch you need to copy patch file in root directory of all php sources, and type "patch -p0 < ext_snmp.patch" (in Unix). Don't hesitate to mail me for any question. Saimoun. [2009-11-27 13:26:59] ch at lathspell dot de The above patch URL is no longer available. Does anybody still have the patch? I could put it on my web page until somebody adds it to the PHP upstream. [2009-05-13 12:25:42] yanirj at orckit dot com Hi, On behalf of Lee Duncan's good will and Murali Sundar's kindess I've uploaded the patch for everyone to download. I truly hope this will get merged into the CVS tree for everyone to enjoy. URL: http://sphinx.not.nu/php_snmp_patch.zip Regards, Yanir. [2009-03-17 11:59:59] yanirj at orckit dot com It would be great if you post the patch. Thanks! The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=37865 -- Edit this bug report at http://bugs.php.net/bug.php?id=37865&edit=1
Bug #54108 [Fbk]: valgrind can not be found if located outside of system's default PATH
Edit report at http://bugs.php.net/bug.php?id=54108&edit=1 ID: 54108 Updated by: lytbo...@php.net Reported by:lytbo...@php.net Summary:valgrind can not be found if located outside of system's default PATH Status: Feedback Type: Bug Package:Unknown/Other Function Operating System: FreeBSD PHP Version:trunk-SVN-2011-02-26 (SVN) Block user comment: N Private report: N New Comment: That works ok. Previous Comments: [2011-02-27 18:56:04] fel...@php.net I've committed a similar patch, can you check if it works? Thanks. [2011-02-27 18:55:41] fel...@php.net Automatic comment from SVN on behalf of felipe Revision: http://svn.php.net/viewvc/?view=revision&revision=308726 Log: - Possible fix for Bug #54108 (valgrind can not be found if located outside of system's default PATH) [2011-02-26 21:46:46] lytbo...@php.net Description: run-tests.php will fail to find valgrind executable if it is located outside of system's default PATH envoronment. In case of FreeBSD default path is /usr/bin:/bin and valgrind is installed into /usr/local/bin/valgrind. Test script: --- make test TESTS="-m ..." Expected result: make should start tests with valgrind enabled Actual result: -- valgrind mode is disabled as valgrind binary is not found -- Edit this bug report at http://bugs.php.net/bug.php?id=54108&edit=1
Req #27967 [Ana->Bgs]: SNMP: need function to load additional MIBs
Edit report at http://bugs.php.net/bug.php?id=27967&edit=1 ID: 27967 Updated by: lytbo...@php.net Reported by:mac dot and dot cheese at hush dot com Summary:SNMP: need function to load additional MIBs -Status: Analyzed +Status: Bogus Type: Feature/Change Request Package:SNMP related Operating System: win32 only PHP Version:4.3.4 -Assigned To: +Assigned To:lytboris Block user comment: N Private report: N New Comment: Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. Previous Comments: [2004-04-28 09:48:52] har...@php.net Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. Hi, A default installation of NET-SNMP does not include the HOST-RESOURCES-MIB in MIB modules read at start up time. IIRC, due to this MIB module is not fully supported on the Windows platform (for the agent side). You need to have the HOST_RESOURCES-MIB, someone else will need another MIB, and maybe some one will need a enterprise specific MIB module. It will become impossible to fulfil all those requests and people depending on other MIB modules better built the binary themselves. (note, I do not built the binary version, so he may choose differently) Of course, an option is to add a configuration function with which additional MIB modules can be loaded in PHP. [2004-04-12 17:40:28] mac dot and dot cheese at hush dot com Description: Working with Windows PHP 4.3.4 or 4.3.5 SNMP does not load all MIBS in c:/usr/mibs directory. php_snmp.dll compiled without HOST-RESOURCES_MIB. Suggest adding additional MIBs to DEFAULT-MIB string in php_snmp.dll. I used a Hex Editor and modified the MIB String in the dll, adding HOST-RESOURCES.MIB;; (replacing SNMP-NOTIFICATION_MIB) and got desired results from snmprealwalk command. Add additional MIBs matching those provided with PHP release. Could not fine another reference to loading additional MIBs NOTE: Unix (FreeBSD 4.9 - PHP 4.3.4) returns all of the text descriptors correctly. ucd-snmp 4.2.3 DEFAULT-MIBS (config.h) included HOST-RESOURCES-MIB and others... Reproduce code: --- snmprealwalk("127.0.0.1","public",""); snmpwalk or snmpwalkoid performs the same Expected result: host.hrSystem.hrSystemUptime.0 | Timeticks: (161078621) 18 days, 15:26:26.21 Actual result: -- 25.1.1.0 | Timeticks: (161078621) 18 days, 15:26:26.21 -- Edit this bug report at http://bugs.php.net/bug.php?id=27967&edit=1
Req #34910 [Opn->Bgs]: OID not parsed with invalid string index
Edit report at http://bugs.php.net/bug.php?id=34910&edit=1 ID: 34910 Updated by: lytbo...@php.net Reported by:ch at westend dot com Summary:OID not parsed with invalid string index -Status: Open +Status: Bogus Type: Feature/Change Request Package:SNMP related Operating System: Debian GNU/Linux PHP Version:5CVS-2005-11-02 (snap) -Assigned To: +Assigned To:lytboris Block user comment: N Private report: N New Comment: Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. Previous Comments: [2005-11-02 13:59:56] ch at westend dot com What about beeing a bit more polite, eh? I tried the latest snapshot and the problem apparently has not been fixed in the meantime or you have to tell me where my syntax is wrong. $ snmpget -v 1 -Ir -c stinger-test 'ASCEND-MIBINET-MIB::internetProfile-Station."cir-1-9"' ASCEND-MIBINET-MIB::internetProfile-Station."cir-1-9" = STRING: "cir-1-9" $ cat t.php ch@xeniac:/tmp/php5-200511020730$ ./sapi/cli/php ~ch/t.php Warning: snmpget(): Invalid object identifier: ASCEND-MIBINET-MIB::internetProfile-Station."cir-1-9" in /home/ch/t.php on line 4 bye, -christian- [2005-10-18 18:22:45] ch at westend dot com Description: The SNMP function seem to not know that it is possible to have string indices like: $ snmpwalk -Ir myhost \ 'ASCEND-MIBINET-MIB::internetProfile-Active."cir-1-26"' which gives: ASCEND-MIBINET-MIB::internetProfile-Active."cir-1-26" = INTEGER: yes(2) (keep the single and double quotes in the example!) It seems that setting the "-Ir" flag is not possible. Reproduce code: --- $x = snmprealwalk('myhost', 'mypassword', "ASCEND-MIBINET-MIB::internetProfile-Station"); var_export($x); print("\n"); gives: array ( 'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-2"' => 'STRING: "bras-1-2"', 'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-3"' => 'STRING: "bras-1-3"', 'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-4"' => 'STRING: "bras-1-4"', 'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-48"' => 'STRING: "bras-1-48"', 'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-5"' => 'STRING: "bras-1-5"', 'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-6"' => 'STRING: "bras-1-6"', Numerically this OID looks like: $ snmpwalk -Ir -On myhost \ 'ASCEND-MIBINET-MIB::internetProfile-Active."cir-1-26"' .1.3.6.1.4.1.529.23.1.1.1.2.8.99.105.114.45.49.45.50.54 = INTEGER: yes(2) The MIB definition looks like this: mibinternetProfileTable OBJECT-TYPE SYNTAX SEQUENCE OF MibinternetProfileEntry ACCESS not-accessible STATUS mandatory DESCRIPTION "A list of mibinternetProfile profile entries." ::= { mibinternetProfile 1 } mibinternetProfileEntry OBJECT-TYPE SYNTAX MibinternetProfileEntry ACCESS not-accessible STATUS mandatory DESCRIPTION "A mibinternetProfile entry containing objects that maps to the parameters of mibinternetProfile profile." INDEX { internetProfile-Station } ::= { mibinternetProfileTable 1 } MibinternetProfileEntry ::= SEQUENCE { internetProfile-Station DisplayString, internetProfile-Active INTEGER, internetProfile-Active OBJECT-TYPE SYNTAX INTEGER { no (1), yes (2) } ACCESS read-write STATUS mandatory DESCRIPTION "A profile can be disabled by setting this field to no. There is no difference between an inactive pr ::= { mibinternetProfileEntry 2 } Expected result: I would have expected to be able to use every OID that the above snmpwalk returns. But they are claimed to be invalid. Actual result: -- Warning: snmpget(): Invalid object identifier: ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-2" in /home/ch/t.php on line 10 -- Edit this bug report at http://bugs.php.net/bug.php?id=34910&edit=1
Bug #44193 [Opn->Fbk]: snmp v3 noAuthNoPriv doesn't work
Edit report at http://bugs.php.net/bug.php?id=44193&edit=1 ID: 44193 Updated by: lytbo...@php.net Reported by:mavezeau at colubris dot com Summary:snmp v3 noAuthNoPriv doesn't work -Status: Open +Status: Feedback Type: Bug Package:SNMP related Operating System: Mandriva 2005/linux PHP Version:5.2CVS-2008-10-27 -Assigned To: +Assigned To: lytboris Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php-trunk-latest.tar.gz For Windows: http://windows.php.net/snapshots/ There is full support for SNMPv3 (with contextName and EngineID) in OO API available in trunk. It needs to be documented though. Previous Comments: [2009-09-08 21:21:55] larryjadams at comcast dot net That's not quite it. That section of the code simply needs to be finished, let alone be documented. [2008-10-27 16:33:50] mavezeau at colubris dot com Now, Some parts work. The security level AuthNoPriv and AuthPriv work but noAuthNoPriv doesn't works because php doesn't accept null or '' to auth_protocol and priv_protocol. I think this fix is simple the snmp v3 with noAuthNopriv is very similar of snmp v2c. if I try: snmp3_walk('192.168.130.124','test','noAuthNoPriv','MD5','','','',''); I have this error "error(snmp3_walk(): Could not generate key for authentication pass phrase: MD5)" if I try: snmp3_walk('192.168.130.124','test','noAuthNoPriv',null,null,null,null,''); or snmp3_walk('192.168.130.124','test','noAuthNoPriv','',null,null,null,''); I have this error "Invalid authenfication protocol:" [2008-02-20 21:23:28] mavezeau at colubris dot com Description: I try to make a query with snmp v3 and I have an error: "snmp3_walk(): An error occurred" or "snmp3_walk(): No response from 192.168.130.124". If I execute a query with net-snmp 5.4.1 the query is ok. If I execute the similar query with php I have those errors. Reproduce code: --- AuthNoPriv net-snmp Query: snmpwalk -v 3 -l authNoPriv -a MD5 -A jesuisuntest -u test5 192.168.130.124 it Works! Php snmp snmp3_walk('192.168.130.124','test5','authNoPriv','MD5','jesuisuntest','','',''); Error ! noAuthNoPriv net-snmp query: snmpwalk -v 3 -l noAuthNoPriv -u test 192.168.130.124 it works! PHP snmp snmp3_walk('192.168.130.124','test','noAuthNoPriv','','','','',''); error(snmp3_walk(): Invalid authentication protocol) if use the default snmp3_walk('192.168.130.124','test','noAuthNoPriv','MD5','','','',''); error(snmp3_walk(): Could not generate key for authentication pass phrase: MD5) Expected result: Similar return value than smnp v2c Actual result: -- all method make an error -- Edit this bug report at http://bugs.php.net/bug.php?id=44193&edit=1
Req #45395 [Opn->Wfx]: snmpgetnext only returns value
Edit report at http://bugs.php.net/bug.php?id=45395&edit=1 ID: 45395 Updated by: lytbo...@php.net Reported by:chrisohaver at gmail dot com Summary:snmpgetnext only returns value -Status: Open +Status: Wont fix Type: Feature/Change Request Package:SNMP related Operating System: Linux PHP Version:5.2.6 -Assigned To: +Assigned To:lytboris Block user comment: N Private report: N New Comment: Value-only is the desired result. If you need to get OID with it's value simultaneously you may try new OO API available in trunk: $session->getnext(array($oid)) will return an associative array oid => value. Previous Comments: [2008-06-30 20:17:30] chrisohaver at gmail dot com Description: snmpgetnext does not return the value and oid of the next object. Reproduce code: --- $snmp_response = snmpgetnext($hostname, $community, $object_id); Expected result: snmpgetnext should return the value and the oid of the next object. Actual result: -- snmpgetnext only returns the value of the next object. The next oid is not returned. -- Edit this bug report at http://bugs.php.net/bug.php?id=45395&edit=1
Bug #46065 [Opn->Fbk]: snmp_set_quick_print() persists between requests
Edit report at http://bugs.php.net/bug.php?id=46065&edit=1 ID: 46065 Updated by: lytbo...@php.net Reported by:php at painfullscratch dot nl Summary:snmp_set_quick_print() persists between requests -Status: Open +Status: Feedback Type: Bug Package:SNMP related Operating System: * PHP Version:5.*, 6 -Assigned To: +Assigned To:lytboris Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php-trunk-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Please check OO API from trunk. It has an option to specify session-wise OID output format and more. Sources in trunk can be compiled against downto php 5.2 Previous Comments: [2009-09-08 21:16:19] larryjadams at comcast dot net The snmp module needs a bit of rededesign. It should handle many of the commands from the native calls, like multiple OID get's in a single array, in other words, make the OID a mixed type for a get request. Also, the snmp functions should require a resource (aka snmp session) in order to work, just like is done in the API, for which it would be based. In that case, to setup a quick print, you start a session, receive a pointer to a (structure/resource) in return and then all subsequent calls need to also pass the resource to the function. Once you are done, you need to close the sessions. This will have to be a new class of calls though as simply changing thing around will make life difficult for everyone. TheWitness [2008-10-24 08:56:21] j...@php.net It's pretty simple issue, propably need to add some netsnmp shutdown function in RINIT which clears all the settings between requests. [2008-09-12 13:27:09] php at painfullscratch dot nl Description: When PHP runs under Apache and snmp_set_quick_print(TRUE) is issued, the behavior of all SNMP-related functions will be "quick print" for the lifetime of the PID. NET-SNMP Support => enabled NET-SNMP Version => 5.4.1 PHP version: 5.2.4 There are two possibilities: 1) This behavior is "by design": If this is the case I think the manual page for snmp_set_quick_print() needs a warning for this behavior. 2) This is a bug: For each PID the behavior should be (re)set to the default behavior after execution of the script. Reproduce code: --- pet@workmate:/tmp$ sudo /etc/init.d/apache2 restart > /dev/null 2>&1 pet@workmate:/tmp$ for (( i=0; i<5; i++ )) ; do links -dump http://localhost/snmp_get_quick_print.php; done snmp_get_quick_print: '' | pid: '9402' snmp_get_quick_print: '' | pid: '9403' snmp_get_quick_print: '' | pid: '9404' snmp_get_quick_print: '' | pid: '9405' snmp_get_quick_print: '' | pid: '9406' pet@workmate:/tmp$ links -dump http://localhost/snmp_set_quick_print.php snmp_set_quick_print: '' | pid: '9406' pet@workmate:/tmp$ for (( i=0; i<5; i++ )) ; do links -dump http://localhost/snmp_get_quick_print.php; done snmp_get_quick_print: '' | pid: '9403' snmp_get_quick_print: '' | pid: '9404' snmp_get_quick_print: '' | pid: '9446' snmp_get_quick_print: '' | pid: '9405' snmp_get_quick_print: '1' | pid: '9406' -- Edit this bug report at http://bugs.php.net/bug.php?id=46065&edit=1
Req #53594 [Fbk->Tbd]: php-snmp rewrite
Edit report at http://bugs.php.net/bug.php?id=53594&edit=1 ID: 53594 Updated by: lytbo...@php.net Reported by:lytboris at gmail dot com Summary:php-snmp rewrite -Status: Feedback +Status: To be documented Type: Feature/Change Request Package:SNMP related Operating System: irrelevant PHP Version:trunk -Assigned To: +Assigned To:lytboris Block user comment: N Private report: N New Comment: OO API should be documented from scratch as most of old API functions Previous Comments: [2011-01-31 12:41:36] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=307877 Log: Improved SNMP extension. FR #53594 [2011-01-05 19:04:56] lytboris at gmail dot com Introducing full-featured OO API. It covers bug #46065 also. Old API *_set_* functions actually sets `global' preferences, they are used when creating new object instance. $object->... properties are used object(session)-wise. [2010-12-31 19:52:07] lytboris at gmail dot com OK. There will be full-featured OO API without adding new functions into legacy API (e.g. no session support). Though old functions will be provided with two features (in sake of code cimplicity): * multi-OID * strict output typing [2010-12-29 18:22:55] paj...@php.net No need to deprecate it, but tell anyone asking for a feature for the legacy API to migrate to the new shiny one :) [2010-12-29 18:21:57] paj...@php.net It is much easier and cleaner to simply go straight to OO then, without procedural API, and keep the old for legacy apps. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=53594 -- Edit this bug report at http://bugs.php.net/bug.php?id=53594&edit=1
Bug #53862 [Opn->Fbk]: snmp_set_oid_output_format does not allow returning to default etc
Edit report at http://bugs.php.net/bug.php?id=53862&edit=1 ID: 53862 Updated by: lytbo...@php.net Reported by:mloftis at wgops dot com Summary:snmp_set_oid_output_format does not allow returning to default etc -Status: Open +Status: Feedback Type: Bug Package:SNMP related Operating System: Irrelevant PHP Version:5.3.5 Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php-trunk-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Please check OO API from trunk. It has an option to specify session-wise OID output format and more. Sources in trunk can be compiled against downto php 5.2 Previous Comments: [2011-01-28 00:18:00] mloftis at wgops dot com Description: snmp_set_oid_output_format only allows using the FULL (SNMP_OID_OUTPUT_FULL) or NUMERIC (SNMP_OID_OUTPUT_NUMERIC) setting types, neither of which is the default. It also has no corresponding _get_ function call to query/store and return the setting back to "whatever it was before I touched it" I've attached a patch which does both (from the 5.3 branch), extends the existing function to include the available types in UCD Net-SNMP as of 5.4 (not verified/checked against older ones, have not verified that setting to _NONE will not cause crashes). Test script: --- $rvDefault = snmp2_get('127.0.0.1','public','.1.3.6.1.2.1.1.2.0'); snmp_set_oid_output_format(SNMP_OID_OUTPUT_FULL); $rvFull = snmp2_get('127.0.0.1','public','.1.3.6.1.2.1.1.2.0'); snmp_set_oid_output_format(SNMP_OID_OUTPUT_NUMERIC); $rvNumeric = snmp2_get('127.0.0.1','public','.1.3.6.1.2.1.1.2.0'); echo $rvDefault."\n"; echo $rvFull."\n"; echo $rvNumeric."\n"; Expected result: Setting either SNMP_OID_OUTPUT_FULL or SNMP_OID_OUTPUT_NUMERIC would return the library to it's default. Expect there to be an snmp_get_oid_output_format call as well to query the current setting. Actual result: -- Neither of the available snmp_set_oid_output_format constants can return the library to it's default settings. No ability to query the library for the current setting. -- Edit this bug report at http://bugs.php.net/bug.php?id=53862&edit=1
Bug #45893 [Opn->Csd]: Snmp buffer limited to 2048 char
Edit report at http://bugs.php.net/bug.php?id=45893&edit=1 ID: 45893 Updated by: lytbo...@php.net Reported by:nept_uno at hotmail dot com Summary:Snmp buffer limited to 2048 char -Status: Open +Status: Closed Type: Bug Package:SNMP related Operating System: * PHP Version:5.*, 6CVS (2009-01-21) -Assigned To: +Assigned To:lytboris Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. As a part of FR#53594 Previous Comments: [2008-08-22 14:24:54] nept_uno at hotmail dot com Description: snmpget return string with max size 2048 char. If a mib variable contains more than 2048 char, string result isn't complete. I think that problem occurs because in file ext/snmp/snmp.c there is this declaration: char buf[2048]; I'm trying to extend this size (i.e. 4096) but I don't know if this is the solution. Reproduce code: --- $result = @snmpget($ip, $community, $OID_MIB, $timeout, $retries); Expected result: Hex-STRING: 00 01 00 03 03 F3 03 FD 03 FE 04 07 04 11 04 25 04 2F 04 30 04 39 04 3A 04 43 04 4D 04 57 04 58 04 6B 04 6C 04 75 04 76 04 7F 04 93 04 9D 04 A7 04 A8 04 B1 04 BB 04 BC 04 C5 04 CF 04 D9 04 E3 04 ED 04 F7 04 F8 05 01 05 0B 05 0C 05 15 05 1F 05 29 05 33 05 34 05 3D 05 3E 05 47 05 48 05 51 05 5B 05 65 05 6F 05 79 05 83 05 8D 05 8E 05 A1 05 AB 05 B5 05 B6 05 C9 05 CA 07 E5 07 E6 07 EF 07 F9 08 03 08 0D 08 17 08 2B 08 35 08 3F 08 40 08 49 08 4A 08 53 08 67 08 71 08 7B 08 85 08 99 08 A3 08 A4 08 AD 08 B7 08 B8 08 C1 08 CB 08 D5 08 D6 08 DF 08 E9 08 EA 08 F3 08 FD 09 07 09 1B 09 1C 09 25 09 2F 09 30 09 39 09 3A 09 43 09 4D 09 61 09 6B 09 75 09 7F 09 80 09 89 09 93 09 9D 09 A7 09 B1 09 B2 0B C3 0B CD 0B CE 0B D7 0B D8 0B E1 0B EB 0B F5 0B FF 0C 00 0C 0A 0C 13 0C 14 0C 1D 0C 1E 0C 27 0C 31 0C 3B 0C 45 0C 4F 0C 59 0C 63 0C 6D 0C 77 0C 81 0C 82 0C 8B 0C 95 0C 9F 0C A9 0C B3 0C BD 0C C7 0C D1 0C DB 0C DC 0C E5 0C EF 0C F9 0D 03 0D 0D 0D 17 0D 21 0D 2B 0D 35 0D 3F 0D 49 0D 53 0D 5D 0D 67 0D 71 0D 7B 0D 85 0D 8F 0D 90 0D 99 0F AB 0F B5 0F BF 0F C9 0F DD 0F E7 0F F1 0F F2 0F FB 10 05 10 06 10 0F 10 23 10 2D 10 37 10 41 10 4B 10 55 10 56 10 5F 10 69 10 73 10 74 10 7D 10 87 10 91 10 92 10 9B 10 A5 10 AF 10 B0 10 B9 10 BA 10 C3 10 C4 10 CD 10 CE 10 D7 10 E1 10 E2 10 EB 10 EC 10 F5 10 FF 11 09 11 13 11 1D 11 27 11 31 11 3B 11 45 11 4F 11 59 11 63 11 6D 11 77 11 81 11 82 13 9D 13 9E 13 A7 13 B1 13 BB 13 BC 13 C5 13 CF 13 D9 13 E3 13 E4 13 ED 13 F7 13 F8 14 01 14 02 14 0B 14 0C 14 15 14 16 14 1F 14 29 14 33 14 3D 14 3E 14 47 14 5B 14 65 14 6F 14 79 14 7A 14 83 14 97 14 98 14 A1 14 AB 14 B5 14 B6 14 BF 14 C9 14 CA 14 D3 14 E7 14 F1 14 FB 15 05 15 06 15 0F 15 19 15 23 15 24 15 2D 15 37 15 41 15 4B 15 4C 15 55 15 56 15 5F 17 7B 17 85 17 8F 17 99 17 A3 17 A4 17 AD 17 AE 17 B7 17 C1 17 CB 17 D5 17 D6 17 DF 17 E0 17 E9 17 F3 17 FD 17 FE 18 07 18 11 18 1B 18 1C 18 25 18 2F 18 30 18 39 18 3A 18 43 18 4D 18 57 18 61 18 62 18 75 18 7F 18 89 18 93 18 9D 18 9E 18 A7 18 B1 18 BB 18 C5 18 CF 18 D9 18 E3 18 ED 18 EE 18 F7 19 01 19 0B 19 0C 19 15 19 16 19 1F 19 20 19 29 19 33 19 3D 19 3E 19 47 19 48 19 51 1B 63 1B 6D 1B 77 1B 81 1B 8B 1B 8C 1B 95 1B 96 1B 9F 1B A9 1B B3 1B B4 1B BD 1B BE 1B C7 1B C8 1B D1 1B D2 1B DB 1B E5 1B EF 1B F9 1B FA 1C 03 1C 0D 1C 17 1C 18 1C 2B 1C 35 1C 3F 1C 40 1C 53 1C 5D 1C 5E 1C 67 1C 71 1C 7B 1C 7C 1C 85 1C 8F 1C 99 1C A3 1C A4 1C AD 1C AE 1C B7 1C C1 1C CB 1C D5 1C DF 1C E0 1C E9 1C F3 1C F4 1C FD 1D 07 1D 25 1D 2F 1D 39 1F 4B 1F 56 1F 60 1F 6A 1F 74 1F 7E 1F 92 1F 93 1F 9C 1F A6 1F B0 1F C4 1F C5 1F CE 1F D8 1F EC 1F F6 1F F7 20 00 20 01 20 0A 20 14 20 1E 20 1F 20 28 20 29 20 32 20 33 20 3C 20 3D 20 46 20 50 20 51 20 5A 20 64 20 65 20 6E 20 78 20 82 20 83 20 8C 20 96 20 97 20 A0 20 AA 20 B4 20 B5 20 BE 20 BF 20 C8 20 D2 20 D3 20 DC 20 DD 20 E6 20 F0 20 F1 20 FA 21 04 21 0E 21 18 21 19 21 22 21 23 27 1B 27 1C 27 25 27 26 27 2F 27 30 27 39 27 3A 27 43 27 44 27 4D 27 57 27 61 27 6B 27 75 27 7F 27 80 27 89 27 93 27 9D 27 9E 27 A7 27 A8 27 B1 27 B2 27 BB 27 BC 27 C5 27 C6 27 CF 27 D9 27 E3 27 ED 27 F7 28 01 28 0B 28 0C 28 15 28 16 28 1F 28 20 28 29 28 33 28 3D 28 47 28 48 28 51 28 5B 28 65 28 66 28 6F 28 70 28 79 28 83 28 8D 28 97 28 98 28 A1 28 AB 28 AC 28 B5 28 B6 28 BF 28 C9 28 D3 28 D4 28 DD 28 E7 28 F1 28 F2 2B 03 2B 17 2B 18 2B 21 2B 22 2B 2B 2B 2C 2B 35 2B 36 2B 3F 2B 40 2B 49 2B 53 2B 5D 2B 67 2B 71 2B 7B 2B 85 2B 8F 2B 99 2B A3 2B AD 2B B7 2B C1 2
Bug #51336 [Opn->Csd]: snmprealwalk (snmp v1) does not handle end of OID tree correctly
Edit report at http://bugs.php.net/bug.php?id=51336&edit=1 ID: 51336 Updated by: lytbo...@php.net Reported by:lytboris at gmail dot com Summary:snmprealwalk (snmp v1) does not handle end of OID tree correctly -Status: Open +Status: Closed Type: Bug Package:SNMP related Operating System: * PHP Version:Irrelevant -Assigned To: +Assigned To:lytboris Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2011-01-31 12:34:14] lytbo...@php.net Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=307876 Log: Fixed bug #51336 [2010-12-01 20:56:30] lytboris at gmail dot com Any progress on this bug? [2010-03-20 11:52:24] lytboris at gmail dot com Description: When snmprealwalk is asked for complete OID tree (thus it may not be . OID but every OID prefix covers system-wide last OID) it does not handle nosuchname error (that is used in snmpv1 as NOSUCHINSTANCE) reported by agent correctly showing nonsense warnings. This is because error handling case does not `know' about SNMP_CMD_REALWALK query type, only about SNMP_CMD_WALK. Test script: --- Expected result: Number of entries: Actual result: -- PHP Warning: snmprealwalk(): Error in packet: (noSuchName) There is no such variable name in this MIB. in /home/nc/tmp/perl-snmp-test-case/case-1/php-walk-case1.php on line 8 PHP Warning: snmprealwalk(): This name does not exist: iso.3.6.1.6.3.16.1.5.2.1.6.6.115.121.115.116.101.109.1.1 in /home/nc/tmp/perl-snmp-test-case/case-1/php-walk-case1.php on line 8 It's busted -- Edit this bug report at http://bugs.php.net/bug.php?id=51336&edit=1
Req #53594 [Com]: php-snmp rewrite
Edit report at http://bugs.php.net/bug.php?id=53594&edit=1 ID: 53594 Comment by: lytboris at gmail dot com Reported by:lytboris at gmail dot com Summary:php-snmp rewrite Status: Feedback Type: Feature/Change Request Package:SNMP related Operating System: irrelevant PHP Version:trunk Block user comment: N Private report: N New Comment: Introducing full-featured OO API. It covers bug #46065 also. Old API *_set_* functions actually sets `global' preferences, they are used when creating new object instance. $object->... properties are used object(session)-wise. Previous Comments: [2010-12-31 19:52:07] lytboris at gmail dot com OK. There will be full-featured OO API without adding new functions into legacy API (e.g. no session support). Though old functions will be provided with two features (in sake of code cimplicity): * multi-OID * strict output typing [2010-12-29 18:22:55] paj...@php.net No need to deprecate it, but tell anyone asking for a feature for the legacy API to migrate to the new shiny one :) [2010-12-29 18:21:57] paj...@php.net It is much easier and cleaner to simply go straight to OO then, without procedural API, and keep the old for legacy apps. [2010-12-29 18:17:11] lytboris at gmail dot com You have guessed my next target - OO interface. :-) If you apply new patch you'll see there is very small piece of code making SNMPv1 functions be polymorphic - dozen of lines, not more. My thoughts are that old API should be deprecated sometime, so there will be session-only support: both OO and non-OO. [2010-12-29 18:02:23] paj...@php.net What do you think about keeping the old APIs as it is, froze it and add a much nicer and flexible OO one instead? For any new improvements? That's what I did for zip and brings much more rooms for new stuff while reducing the maintenance work load. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=53594 -- Edit this bug report at http://bugs.php.net/bug.php?id=53594&edit=1
Req #53594 [Com]: php-snmp rewrite
Edit report at http://bugs.php.net/bug.php?id=53594&edit=1 ID: 53594 Comment by: lytboris at gmail dot com Reported by:lytboris at gmail dot com Summary:php-snmp rewrite Status: Feedback Type: Feature/Change Request Package:SNMP related Operating System: irrelevant PHP Version:trunk Block user comment: N Private report: N New Comment: OK. There will be full-featured OO API without adding new functions into legacy API (e.g. no session support). Though old functions will be provided with two features (in sake of code cimplicity): * multi-OID * strict output typing Previous Comments: [2010-12-29 18:22:55] paj...@php.net No need to deprecate it, but tell anyone asking for a feature for the legacy API to migrate to the new shiny one :) [2010-12-29 18:21:57] paj...@php.net It is much easier and cleaner to simply go straight to OO then, without procedural API, and keep the old for legacy apps. [2010-12-29 18:17:11] lytboris at gmail dot com You have guessed my next target - OO interface. :-) If you apply new patch you'll see there is very small piece of code making SNMPv1 functions be polymorphic - dozen of lines, not more. My thoughts are that old API should be deprecated sometime, so there will be session-only support: both OO and non-OO. [2010-12-29 18:02:23] paj...@php.net What do you think about keeping the old APIs as it is, froze it and add a much nicer and flexible OO one instead? For any new improvements? That's what I did for zip and brings much more rooms for new stuff while reducing the maintenance work load. [2010-12-29 17:56:28] lytboris at gmail dot com Reuploaded patches (to be allied against trunk) + session-like workflow: $session = snmp_session_open(...); $result = snmpget($oid); ... snmp_session_close($session); + support for SNMPv3 contextName & contextEngineID properties in new syntax style + tests for new features snmp(real)?{get,walk,set} functions are now polymorphic - they accepts both old (SNMPv1) arguments and new session-like. All version protocols are handled by the since protocol version is now set using snmp_session_open. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=53594 -- Edit this bug report at http://bugs.php.net/bug.php?id=53594&edit=1
Req #53594 [Com]: php-snmp rewrite
Edit report at http://bugs.php.net/bug.php?id=53594&edit=1 ID: 53594 Comment by: lytboris at gmail dot com Reported by:lytboris at gmail dot com Summary:php-snmp rewrite Status: Feedback Type: Feature/Change Request Package:SNMP related Operating System: irrelevant PHP Version:trunk Block user comment: N Private report: N New Comment: You have guessed my next target - OO interface. :-) If you apply new patch you'll see there is very small piece of code making SNMPv1 functions be polymorphic - dozen of lines, not more. My thoughts are that old API should be deprecated sometime, so there will be session-only support: both OO and non-OO. Previous Comments: [2010-12-29 18:02:23] paj...@php.net What do you think about keeping the old APIs as it is, froze it and add a much nicer and flexible OO one instead? For any new improvements? That's what I did for zip and brings much more rooms for new stuff while reducing the maintenance work load. [2010-12-29 17:56:28] lytboris at gmail dot com Reuploaded patches (to be allied against trunk) + session-like workflow: $session = snmp_session_open(...); $result = snmpget($oid); ... snmp_session_close($session); + support for SNMPv3 contextName & contextEngineID properties in new syntax style + tests for new features snmp(real)?{get,walk,set} functions are now polymorphic - they accepts both old (SNMPv1) arguments and new session-like. All version protocols are handled by the since protocol version is now set using snmp_session_open. [2010-12-23 09:03:38] lytboris at gmail dot com This patch covers bugs #44193 #45893 #51336 [2010-12-23 07:20:18] lytboris at gmail dot com I know about version lifecycle. But Cacti 087 (Larry mentioned it) runs on 5.2 branch. Here you are patch for trunk. There is no difference between 5.3 and trunk for now so this patch may be appied to 5.3 branch too. [2010-12-22 22:07:14] paj...@php.net Thanks for this great patch :) However 5.3 is in maintenance mode (and 5.2 is dead btw), please provide a patch against trunk instead. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=53594 -- Edit this bug report at http://bugs.php.net/bug.php?id=53594&edit=1
Req #53594 [Com]: php-snmp rewrite
Edit report at http://bugs.php.net/bug.php?id=53594&edit=1 ID: 53594 Comment by: lytboris at gmail dot com Reported by:lytboris at gmail dot com Summary:php-snmp rewrite Status: Feedback Type: Feature/Change Request Package:SNMP related Operating System: irrelevant PHP Version:5.2.16 Block user comment: N Private report: N New Comment: Reuploaded patches (to be allied against trunk) + session-like workflow: $session = snmp_session_open(...); $result = snmpget($oid); ... snmp_session_close($session); + support for SNMPv3 contextName & contextEngineID properties in new syntax style + tests for new features snmp(real)?{get,walk,set} functions are now polymorphic - they accepts both old (SNMPv1) arguments and new session-like. All version protocols are handled by the since protocol version is now set using snmp_session_open. Previous Comments: [2010-12-23 09:03:38] lytboris at gmail dot com This patch covers bugs #44193 #45893 #51336 [2010-12-23 07:20:18] lytboris at gmail dot com I know about version lifecycle. But Cacti 087 (Larry mentioned it) runs on 5.2 branch. Here you are patch for trunk. There is no difference between 5.3 and trunk for now so this patch may be appied to 5.3 branch too. [2010-12-22 22:07:14] paj...@php.net Thanks for this great patch :) However 5.3 is in maintenance mode (and 5.2 is dead btw), please provide a patch against trunk instead. [2010-12-22 20:05:04] lytboris at gmail dot com Patch was created for 5.3 branch and then adopted to be used in 5.2 branch. [2010-12-22 19:49:37] lytboris at gmail dot com Description: The main new feature is multi OID get/getnext/set commands. Another one - strong and simple return value logic: if command fails, return nothing but FALSE. No empty strings, no SNMP error messages as values, etc. Just FALSE. Another effort was to cover source code with unit tests. Results: 100% functions (-zm_info_snmp, but it is not actually snmp function), 94% source code lines. -- Edit this bug report at http://bugs.php.net/bug.php?id=53594&edit=1
Req #53594 [Com]: php-snmp rewrite
Edit report at http://bugs.php.net/bug.php?id=53594&edit=1 ID: 53594 Comment by: lytboris at gmail dot com Reported by:lytboris at gmail dot com Summary:php-snmp rewrite Status: Feedback Type: Feature/Change Request Package:SNMP related Operating System: irrelevant PHP Version:5.2.16 Block user comment: N Private report: N New Comment: This patch covers bugs #44193 #45893 #51336 Previous Comments: [2010-12-23 07:20:18] lytboris at gmail dot com I know about version lifecycle. But Cacti 087 (Larry mentioned it) runs on 5.2 branch. Here you are patch for trunk. There is no difference between 5.3 and trunk for now so this patch may be appied to 5.3 branch too. [2010-12-22 22:07:14] paj...@php.net Thanks for this great patch :) However 5.3 is in maintenance mode (and 5.2 is dead btw), please provide a patch against trunk instead. [2010-12-22 20:05:04] lytboris at gmail dot com Patch was created for 5.3 branch and then adopted to be used in 5.2 branch. [2010-12-22 19:49:37] lytboris at gmail dot com Description: The main new feature is multi OID get/getnext/set commands. Another one - strong and simple return value logic: if command fails, return nothing but FALSE. No empty strings, no SNMP error messages as values, etc. Just FALSE. Another effort was to cover source code with unit tests. Results: 100% functions (-zm_info_snmp, but it is not actually snmp function), 94% source code lines. -- Edit this bug report at http://bugs.php.net/bug.php?id=53594&edit=1
Req #53594 [Com]: php-snmp rewrite
Edit report at http://bugs.php.net/bug.php?id=53594&edit=1 ID: 53594 Comment by: lytboris at gmail dot com Reported by:lytboris at gmail dot com Summary:php-snmp rewrite Status: Feedback Type: Feature/Change Request Package:SNMP related Operating System: irrelevant PHP Version:5.2.16 Block user comment: N Private report: N New Comment: I know about version lifecycle. But Cacti 087 (Larry mentioned it) runs on 5.2 branch. Here you are patch for trunk. There is no difference between 5.3 and trunk for now so this patch may be appied to 5.3 branch too. Previous Comments: [2010-12-22 22:07:14] paj...@php.net Thanks for this great patch :) However 5.3 is in maintenance mode (and 5.2 is dead btw), please provide a patch against trunk instead. [2010-12-22 20:05:04] lytboris at gmail dot com Patch was created for 5.3 branch and then adopted to be used in 5.2 branch. [2010-12-22 19:49:37] lytboris at gmail dot com Description: The main new feature is multi OID get/getnext/set commands. Another one - strong and simple return value logic: if command fails, return nothing but FALSE. No empty strings, no SNMP error messages as values, etc. Just FALSE. Another effort was to cover source code with unit tests. Results: 100% functions (-zm_info_snmp, but it is not actually snmp function), 94% source code lines. -- Edit this bug report at http://bugs.php.net/bug.php?id=53594&edit=1
Req #53594 [Com]: php-snmp rewrite
Edit report at http://bugs.php.net/bug.php?id=53594&edit=1 ID: 53594 Comment by: lytboris at gmail dot com Reported by:lytboris at gmail dot com Summary:php-snmp rewrite Status: Open Type: Feature/Change Request Package:SNMP related Operating System: irrelevant PHP Version:5.2.16 Block user comment: N Private report: N New Comment: Patch was created for 5.3 branch and then adopted to be used in 5.2 branch. Previous Comments: [2010-12-22 19:49:37] lytboris at gmail dot com Description: The main new feature is multi OID get/getnext/set commands. Another one - strong and simple return value logic: if command fails, return nothing but FALSE. No empty strings, no SNMP error messages as values, etc. Just FALSE. Another effort was to cover source code with unit tests. Results: 100% functions (-zm_info_snmp, but it is not actually snmp function), 94% source code lines. -- Edit this bug report at http://bugs.php.net/bug.php?id=53594&edit=1
[PHP-BUG] Req #53594 [NEW]: php-snmp rewrite
From: Operating system: irrelevant PHP version: 5.2.16 Package: SNMP related Bug Type: Feature/Change Request Bug description:php-snmp rewrite Description: The main new feature is multi OID get/getnext/set commands. Another one - strong and simple return value logic: if command fails, return nothing but FALSE. No empty strings, no SNMP error messages as values, etc. Just FALSE. Another effort was to cover source code with unit tests. Results: 100% functions (-zm_info_snmp, but it is not actually snmp function), 94% source code lines. -- Edit bug report at http://bugs.php.net/bug.php?id=53594&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53594&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53594&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53594&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53594&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53594&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53594&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53594&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53594&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53594&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53594&r=support Expected behavior: http://bugs.php.net/fix.php?id=53594&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53594&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53594&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53594&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53594&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=53594&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53594&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53594&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53594&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53594&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53594&r=mysqlcfg
Bug #51336 [Com]: snmprealwalk (snmp v1) does not handle end of OID tree correctly
Edit report at http://bugs.php.net/bug.php?id=51336&edit=1 ID: 51336 Comment by: lytboris at gmail dot com Reported by:lytboris at gmail dot com Summary:snmprealwalk (snmp v1) does not handle end of OID tree correctly Status: Open Type: Bug Package:SNMP related Operating System: * PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Any progress on this bug? Previous Comments: [2010-03-20 11:52:24] lytboris at gmail dot com Description: When snmprealwalk is asked for complete OID tree (thus it may not be . OID but every OID prefix covers system-wide last OID) it does not handle nosuchname error (that is used in snmpv1 as NOSUCHINSTANCE) reported by agent correctly showing nonsense warnings. This is because error handling case does not `know' about SNMP_CMD_REALWALK query type, only about SNMP_CMD_WALK. Test script: --- Expected result: Number of entries: Actual result: -- PHP Warning: snmprealwalk(): Error in packet: (noSuchName) There is no such variable name in this MIB. in /home/nc/tmp/perl-snmp-test-case/case-1/php-walk-case1.php on line 8 PHP Warning: snmprealwalk(): This name does not exist: iso.3.6.1.6.3.16.1.5.2.1.6.6.115.121.115.116.101.109.1.1 in /home/nc/tmp/perl-snmp-test-case/case-1/php-walk-case1.php on line 8 It's busted -- Edit this bug report at http://bugs.php.net/bug.php?id=51336&edit=1
[PHP-BUG] Bug #51336 [NEW]: snmprealwalk (snmp v1) does not handle end of OID tree correctly
From: Operating system: * PHP version: Irrelevant Package: SNMP related Bug Type: Bug Bug description:snmprealwalk (snmp v1) does not handle end of OID tree correctly Description: When snmprealwalk is asked for complete OID tree (thus it may not be . OID but every OID prefix covers system-wide last OID) it does not handle nosuchname error (that is used in snmpv1 as NOSUCHINSTANCE) reported by agent correctly showing nonsense warnings. This is because error handling case does not `know' about SNMP_CMD_REALWALK query type, only about SNMP_CMD_WALK. Test script: --- Expected result: Number of entries: Actual result: -- PHP Warning: snmprealwalk(): Error in packet: (noSuchName) There is no such variable name in this MIB. in /home/nc/tmp/perl-snmp-test-case/case-1/php-walk-case1.php on line 8 PHP Warning: snmprealwalk(): This name does not exist: iso.3.6.1.6.3.16.1.5.2.1.6.6.115.121.115.116.101.109.1.1 in /home/nc/tmp/perl-snmp-test-case/case-1/php-walk-case1.php on line 8 It's busted -- Edit bug report at http://bugs.php.net/bug.php?id=51336&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51336&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51336&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51336&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51336&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51336&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51336&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51336&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51336&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51336&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51336&r=support Expected behavior: http://bugs.php.net/fix.php?id=51336&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51336&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51336&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51336&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51336&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=51336&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51336&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51336&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51336&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51336&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51336&r=mysqlcfg
#48273 [Opn]: *_real_walk returns SNMP errors as values
ID: 48273 User updated by: lytboris at gmail dot com Reported By: lytboris at gmail dot com Status: Open Bug Type: SNMP related Operating System: FreeBSD PHP Version: 5.2.9 New Comment: Oups, last line in Actual result should be read as [NET-SNMP-MIB::netSnmp.2.1.2.3.8] => No more variables left in this MIB View (It is past the end of the MIB tree) (wrong copy-paste) Previous Comments: [2009-05-14 06:46:49] lytboris at gmail dot com Description: When remote SNMP agent returns an error with same OID that contained correct value *_real_walk functions will overwrite this correct value with error message because there is no snmp reply status check. Here is patch to address this issue: --- ext/snmp/snmp.c.orig2008-12-31 14:17:43.0 +0300 +++ ext/snmp/snmp.c 2009-05-14 10:31:23.0 +0400 @@ -480,12 +480,15 @@ } else if (st == SNMP_CMD_WALK) { add_next_index_zval(return_value,snmpval); /* Add to returned array */ } else if (st == SNMP_CMD_REALWALK) { + if (vars->type != SNMP_ENDOFMIBVIEW && + vars->type != SNMP_NOSUCHOBJECT && vars->type != SNMP_NOSUCHINSTANCE) { #ifdef HAVE_NET_SNMP - snprint_objid(buf2, sizeof(buf2), vars->name, vars->name_length); + snprint_objid(buf2, sizeof(buf2), vars->name, vars->name_length); #else - sprint_objid(buf2, vars->name, vars->name_length); + sprint_objid(buf2, vars->name, vars->name_length); #endif - add_assoc_zval(return_value,buf2,snmpval); + add_assoc_zval(return_value,buf2,snmpval); + } } if (st >= SNMP_CMD_WALK && st != SNMP_CMD_SET) { if (vars->type != SNMP_ENDOFMIBVIEW && in BASE64 form: begin-base64 644 - LS0tIGV4dC9zbm1wL3NubXAuYy5vcmlnCTIwMDgtMTItMzEgMTQ6MTc6NDMuMDAwMDAwMDAwICsw MzAwCisrKyBleHQvc25tcC9zbm1wLmMJMjAwOS0wNS0xNCAxMDozMToyMy4wMDAwMDAwMDAgKzA0 MDAKQEAgLTQ4MCwxMiArNDgwLDE1IEBACiAJCQkJCX0gZWxzZSBpZiAoc3QgPT0gU05NUF9DTURf V0FMSykgewogCQkJCQkJYWRkX25leHRfaW5kZXhfenZhbChyZXR1cm5fdmFsdWUsc25tcHZhbCk7 IC8qIEFkZCB0byByZXR1cm5lZCBhcnJheSAqLwogCQkJCQl9IGVsc2UgaWYgKHN0ID09IFNOTVBf Q01EX1JFQUxXQUxLKSAgeworCQkJCQkJaWYgKHZhcnMtPnR5cGUgIT0gU05NUF9FTkRPRk1JQlZJ RVcgJiYgCisJCQkJCQkJdmFycy0+dHlwZSAhPSBTTk1QX05PU1VDSE9CSkVDVCAmJiB2YXJzLT50 eXBlICE9IFNOTVBfTk9TVUNISU5TVEFOQ0UpIHsKICNpZmRlZiBIQVZFX05FVF9TTk1QCi0JCQkJ CQlzbnByaW50X29iamlkKGJ1ZjIsIHNpemVvZihidWYyKSwgdmFycy0+bmFtZSwgdmFycy0+bmFt ZV9sZW5ndGgpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgCXNucHJpbnRfb2JqaWQoYnVmMiwgc2l6ZW9mKGJ1ZjIpLCB2YXJzLT5uYW1lLCB2YXJzLT5u YW1lX2xlbmd0aCk7CiAjZWxzZQotCQkJCQkJc3ByaW50X29iamlkKGJ1ZjIsIHZhcnMtPm5hbWUs IHZhcnMtPm5hbWVfbGVuZ3RoKTsKKwkJCQkJCQlzcHJpbnRfb2JqaWQoYnVmMiwgdmFycy0+bmFt ZSwgdmFycy0+bmFtZV9sZW5ndGgpOwogI2VuZGlmCi0JCQkJCQlhZGRfYXNzb2NfenZhbChyZXR1 cm5fdmFsdWUsYnVmMixzbm1wdmFsKTsKKwkJCQkJCQlhZGRfYXNzb2NfenZhbChyZXR1cm5fdmFs dWUsYnVmMixzbm1wdmFsKTsKKwkJCQkJCX0KIAkJCQkJfQogCQkJCQlpZiAoc3QgPj0gU05NUF9D TURfV0FMSyAmJiBzdCAhPSBTTk1QX0NNRF9TRVQpIHsKIAkJCQkJCWlmICh2YXJzLT50eXBlICE9 IFNOTVBfRU5ET0ZNSUJWSUVXICYmIAo= Reproduce code: --- print_r(@snmp2_real_walk("host:161", "community", ".1.3.6.1.4.1.8072.2.1.2.3", (800 * 1000), 2)): === Result shown by snmpwalk: >snmpwalk -v2c -ccommunity host .1.3.6.1.4.1.8072.2.1.2.3 NET-SNMP-MIB::netSnmp.2.1.2.3.1 = "" NET-SNMP-MIB::netSnmp.2.1.2.3.2 = "" NET-SNMP-MIB::netSnmp.2.1.2.3.3 = "" NET-SNMP-MIB::netSnmp.2.1.2.3.4 = "" NET-SNMP-MIB::netSnmp.2.1.2.3.5 = "" NET-SNMP-MIB::netSnmp.2.1.2.3.6 = "" NET-SNMP-MIB::netSnmp.2.1.2.3.7 = "" NET-SNMP-MIB::netSnmp.2.1.2.3.8 = STRING: "blah" NET-SNMP-MIB::netSnmp.2.1.2.3.8 = No more variables left in this MIB View (It is past the end of the MIB tree) Expected result: Array ( [NET-SNMP-MIB::netSnmp.2.1.2.3.1] => "" [NET-SNMP-MIB::netSnmp.2.1.2.3.2] => "" [NET-SNMP-MIB::netSnmp.2.1.2.3.3] => "" [NET-SNMP-MIB::netSnmp.2.1.2.3.4] => "" [NET-SNMP-MIB::netSnmp.2.1.2.3.5] => "" [
#48273 [NEW]: *_real_walk returns SNMP errors as values
From: lytboris at gmail dot com Operating system: FreeBSD PHP version: 5.2.9 PHP Bug Type: SNMP related Bug description: *_real_walk returns SNMP errors as values Description: When remote SNMP agent returns an error with same OID that contained correct value *_real_walk functions will overwrite this correct value with error message because there is no snmp reply status check. Here is patch to address this issue: --- ext/snmp/snmp.c.orig2008-12-31 14:17:43.0 +0300 +++ ext/snmp/snmp.c 2009-05-14 10:31:23.0 +0400 @@ -480,12 +480,15 @@ } else if (st == SNMP_CMD_WALK) { add_next_index_zval(return_value,snmpval); /* Add to returned array */ } else if (st == SNMP_CMD_REALWALK) { + if (vars->type != SNMP_ENDOFMIBVIEW && + vars->type != SNMP_NOSUCHOBJECT && vars->type != SNMP_NOSUCHINSTANCE) { #ifdef HAVE_NET_SNMP - snprint_objid(buf2, sizeof(buf2), vars->name, vars->name_length); + snprint_objid(buf2, sizeof(buf2), vars->name, vars->name_length); #else - sprint_objid(buf2, vars->name, vars->name_length); + sprint_objid(buf2, vars->name, vars->name_length); #endif - add_assoc_zval(return_value,buf2,snmpval); + add_assoc_zval(return_value,buf2,snmpval); + } } if (st >= SNMP_CMD_WALK && st != SNMP_CMD_SET) { if (vars->type != SNMP_ENDOFMIBVIEW && in BASE64 form: begin-base64 644 - LS0tIGV4dC9zbm1wL3NubXAuYy5vcmlnCTIwMDgtMTItMzEgMTQ6MTc6NDMuMDAwMDAwMDAwICsw MzAwCisrKyBleHQvc25tcC9zbm1wLmMJMjAwOS0wNS0xNCAxMDozMToyMy4wMDAwMDAwMDAgKzA0 MDAKQEAgLTQ4MCwxMiArNDgwLDE1IEBACiAJCQkJCX0gZWxzZSBpZiAoc3QgPT0gU05NUF9DTURf V0FMSykgewogCQkJCQkJYWRkX25leHRfaW5kZXhfenZhbChyZXR1cm5fdmFsdWUsc25tcHZhbCk7 IC8qIEFkZCB0byByZXR1cm5lZCBhcnJheSAqLwogCQkJCQl9IGVsc2UgaWYgKHN0ID09IFNOTVBf Q01EX1JFQUxXQUxLKSAgeworCQkJCQkJaWYgKHZhcnMtPnR5cGUgIT0gU05NUF9FTkRPRk1JQlZJ RVcgJiYgCisJCQkJCQkJdmFycy0+dHlwZSAhPSBTTk1QX05PU1VDSE9CSkVDVCAmJiB2YXJzLT50 eXBlICE9IFNOTVBfTk9TVUNISU5TVEFOQ0UpIHsKICNpZmRlZiBIQVZFX05FVF9TTk1QCi0JCQkJ CQlzbnByaW50X29iamlkKGJ1ZjIsIHNpemVvZihidWYyKSwgdmFycy0+bmFtZSwgdmFycy0+bmFt ZV9sZW5ndGgpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgCXNucHJpbnRfb2JqaWQoYnVmMiwgc2l6ZW9mKGJ1ZjIpLCB2YXJzLT5uYW1lLCB2YXJzLT5u YW1lX2xlbmd0aCk7CiAjZWxzZQotCQkJCQkJc3ByaW50X29iamlkKGJ1ZjIsIHZhcnMtPm5hbWUs IHZhcnMtPm5hbWVfbGVuZ3RoKTsKKwkJCQkJCQlzcHJpbnRfb2JqaWQoYnVmMiwgdmFycy0+bmFt ZSwgdmFycy0+bmFtZV9sZW5ndGgpOwogI2VuZGlmCi0JCQkJCQlhZGRfYXNzb2NfenZhbChyZXR1 cm5fdmFsdWUsYnVmMixzbm1wdmFsKTsKKwkJCQkJCQlhZGRfYXNzb2NfenZhbChyZXR1cm5fdmFs dWUsYnVmMixzbm1wdmFsKTsKKwkJCQkJCX0KIAkJCQkJfQogCQkJCQlpZiAoc3QgPj0gU05NUF9D TURfV0FMSyAmJiBzdCAhPSBTTk1QX0NNRF9TRVQpIHsKIAkJCQkJCWlmICh2YXJzLT50eXBlICE9 IFNOTVBfRU5ET0ZNSUJWSUVXICYmIAo= Reproduce code: --- print_r(@snmp2_real_walk("host:161", "community", ".1.3.6.1.4.1.8072.2.1.2.3", (800 * 1000), 2)): === Result shown by snmpwalk: >snmpwalk -v2c -ccommunity host .1.3.6.1.4.1.8072.2.1.2.3 NET-SNMP-MIB::netSnmp.2.1.2.3.1 = "" NET-SNMP-MIB::netSnmp.2.1.2.3.2 = "" NET-SNMP-MIB::netSnmp.2.1.2.3.3 = "" NET-SNMP-MIB::netSnmp.2.1.2.3.4 = "" NET-SNMP-MIB::netSnmp.2.1.2.3.5 = "" NET-SNMP-MIB::netSnmp.2.1.2.3.6 = "" NET-SNMP-MIB::netSnmp.2.1.2.3.7 = "" NET-SNMP-MIB::netSnmp.2.1.2.3.8 = STRING: "blah" NET-SNMP-MIB::netSnmp.2.1.2.3.8 = No more variables left in this MIB View (It is past the end of the MIB tree) Expected result: Array ( [NET-SNMP-MIB::netSnmp.2.1.2.3.1] => "" [NET-SNMP-MIB::netSnmp.2.1.2.3.2] => "" [NET-SNMP-MIB::netSnmp.2.1.2.3.3] => "" [NET-SNMP-MIB::netSnmp.2.1.2.3.4] => "" [NET-SNMP-MIB::netSnmp.2.1.2.3.5] => "" [NET-SNMP-MIB::netSnmp.2.1.2.3.6] => "" [NET-SNMP-MIB::netSnmp.2.1.2.3.7] => "" [NET-SNMP-MIB::netSnmp.2.1.2.3.8] => "blah" ) Actual result: -- Array ( [NET-SNMP-MIB::netSnmp.2.1.2.3.1] => "" [NET-SNMP-MIB::netSnmp.2.1.2.3.2] => "" [NET-SNMP-MIB::netSnmp.2.1.2.3.3] => "" [NET-SNMP-MIB::ne