#31772 [Opn]: [PATCH] Net-SNMP 5.2.x ++ Workaround in PHP_SNMP Incorrectly Coded
ID: 31772 Updated by: [EMAIL PROTECTED] -Reported By: LarryJAdams at comcast dot net +Reported By: [EMAIL PROTECTED] Status: Open Bug Type: SNMP related Operating System: Win32 PHP Version: 5.0.3 New Comment: 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. Previous Comments: [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] [EMAIL PROTECTED] What's wrong with adding something like 'snmp_set_version()' func instead of having separate functions for v1/v2/v3 ??? [2005-03-01 01:24:53] LarryJAdams at comcast dot net The prior post was for the snmp.c files. The php_snmp.h files are patched as follows: php_snmp.h for php4.3.x http://home.comcast.net/~larryjadams/php_snmp.4.3.x.diff php_snmp.h for php5.0.x http://home.comcast.net/~larryjadams/php_snmp.5.0.x.diff php_snmp.h for php5.1.x http://home.comcast.net/~larryjadams/php_snmp.5.1.x.diff TheWitness [2005-03-01 00:52:58] LarryJAdams at comcast dot net Your links are as follows: php_snmp for php4.3.x http://home.comcast.net/~larryjadams/snmp4.3.x.diff php_snmp for php5.0.x http://home.comcast.net/~larryjadams/snmp5.0.x.diff php_snmp for php5.1.x http://home.comcast.net/~larryjadams/snmp5.1.x.diff TheWitness [2005-02-28 20:54:38] [EMAIL PROTECTED] Please provide the unified diff somewhere in the web and add the url to it here. 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/31772 -- Edit this bug report at http://bugs.php.net/?id=31772&edit=1
#31772 [Opn]: [PATCH] Net-SNMP 5.2.x ++ Workaround in PHP_SNMP Incorrectly Coded
ID: 31772 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: SNMP related Operating System: Win32 PHP Version: 5.0.3 New Comment: 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). Previous Comments: [2005-03-16 13:47:39] [EMAIL PROTECTED] 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] [EMAIL PROTECTED] What's wrong with adding something like 'snmp_set_version()' func instead of having separate functions for v1/v2/v3 ??? [2005-03-01 01:24:53] LarryJAdams at comcast dot net The prior post was for the snmp.c files. The php_snmp.h files are patched as follows: php_snmp.h for php4.3.x http://home.comcast.net/~larryjadams/php_snmp.4.3.x.diff php_snmp.h for php5.0.x http://home.comcast.net/~larryjadams/php_snmp.5.0.x.diff php_snmp.h for php5.1.x http://home.comcast.net/~larryjadams/php_snmp.5.1.x.diff TheWitness [2005-03-01 00:52:58] LarryJAdams at comcast dot net Your links are as follows: php_snmp for php4.3.x http://home.comcast.net/~larryjadams/snmp4.3.x.diff php_snmp for php5.0.x http://home.comcast.net/~larryjadams/snmp5.0.x.diff php_snmp for php5.1.x http://home.comcast.net/~larryjadams/snmp5.1.x.diff TheWitness 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/31772 -- Edit this bug report at http://bugs.php.net/?id=31772&edit=1
#27967 [Opn->Ana]: SNMP: compile bundled snmp dll with HOST-RESOURCES_MIB
ID: 27967 Updated by: [EMAIL PROTECTED] Reported By: mac dot and dot cheese at hush dot com -Status: Open +Status: Analyzed Bug Type: Feature/Change Request Operating System: win32 only PHP Version: 4.3.4 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. 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. Previous Comments: [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/?id=27967&edit=1
#23685 [Opn]: fake values returned when OID value is an empty string
ID: 23685 Updated by: [EMAIL PROTECTED] Reported By: s dot zagrodzki at net dot icm dot edu dot pl Status: Open Bug Type: SNMP related Operating System: Linux 2.2 PHP Version: 4.3.2RC4-dev New Comment: Attempted in various ways, but I cannot reproduce this. Maybe it is a Linux problem, since I do PHP development on a CYGWIN system. Neither do I get the same results as the 'user contributed note' on snmpget. Previous Comments: [2003-07-14 09:44:57] s dot zagrodzki at net dot icm dot edu dot pl this issue was also mentioned by javierb at gmx dot net in user contributed notes to snmpget() function manual: http://www.php.net/manual/en/function.snmpget.php [2003-07-14 03:38:00] s dot zagrodzki at net dot icm dot edu dot pl I tried using snmp module from 20030714 snapshot - didn't help. [2003-07-14 02:35:43] s dot zagrodzki at net dot icm dot edu dot pl this is a part of tcpdump of snmpwalk query: ... GetResponse(50) .1.3.6.1.2.1.31.1.1.1.18.3="lacze do Obs. Astr." GetNextRequest(31) .1.3.6.1.2.1.31.1.1.1.18.3 GetResponse(31) .1.3.6.1.2.1.31.1.1.1.18.4="" GetNextRequest(31) .1.3.6.1.2.1.31.1.1.1.18.4 GetResponse(59) .1.3.6.1.2.1.31.1.1.1.18.5=": lacze do Wydz. Zarzadzania" ... as you can see, snmp agent returns empty value, response length is also correct. And snmpwalk utility also gives correct results. [2003-07-13 14:49:20] [EMAIL PROTECTED] I tried this with other variables (I do not have an SNMP agent implementing the ifXTable) and cannot reproduce it. Therefore I am thinking that it maybe the SNMP agent which returns these values and as a result they show up in PHP. Could you confirm that this is not a problem with the SNMP agent/router. [2003-07-13 00:11:43] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Some changes have been made lately. 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/23685 -- Edit this bug report at http://bugs.php.net/?id=23685&edit=1
#6584 [Opn->Csd]: SNMP "get-next" function is missing
ID: 6584 Updated by: [EMAIL PROTECTED] Reported By: maziero at ppgia dot pucpr dot br -Status: Open +Status: Closed Bug Type: Feature/Change Request Operating System: Linux PHP Version: 4.0.2 New Comment: This feature is added now and will be in the release from PHP 5.x onwards. Previous Comments: [2000-09-06 17:44:39] maziero at ppgia dot pucpr dot br It seems that a SNMP "get-next" function (snmpgetnext) would be very useful. It is provided in the SNMP protocol, in order to make easy for managers to access table structures in an efficient way. Without this function, the PHP page should know exactly the table structure in the MIB. Also, using the "snmpwalk" function, much more data should be processed in the PHP page in order to parse the data and rebuild the table structure. -- Edit this bug report at http://bugs.php.net/?id=6584&edit=1
#23685 [Fbk->Ana]: fake values returned when OID value is an empty string
ID: 23685 Updated by: [EMAIL PROTECTED] Reported By: s dot zagrodzki at net dot icm dot edu dot pl -Status: Feedback +Status: Analyzed Bug Type: SNMP related Operating System: Linux 2.2 PHP Version: 4.3.2RC4-dev New Comment: I tried this with other variables (I do not have an SNMP agent implementing the ifXTable) and cannot reproduce it. Therefore I am thinking that it maybe the SNMP agent which returns these values and as a result they show up in PHP. Could you confirm that this is not a problem with the SNMP agent/router. Previous Comments: [2003-07-13 00:11:43] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Some changes have been made lately. [2003-05-19 04:30:19] s dot zagrodzki at net dot icm dot edu dot pl I've copied ext/snmp directory from this snapshot into my php source tree (when I tried to compile the snap as it is, it complained about too old db3 library). It didn't help. [2003-05-18 16:57:47] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2003-05-18 15:47:25] s dot zagrodzki at net dot icm dot edu dot pl PHP with snmp module. Sample piece of output from snmpwalk utility from ucd-snmp: $ snmpwalk ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias ... ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.3 = lacze do Obs. Astr. ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.4 = ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.5 = : lacze do Wydz. Zarzadzania ... (value of ifAlias.4 is an empty string). Sample script: ", "", "ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias"); print_r($ifAlias); ?> Output of sample script: [ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.3] => lacze do Obs. Astr. [ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.4] => lacze do Obs. Astr. [ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.5] => : lacze do Wydz. Zarzadz (ifAlias.4 is now the same as ifAlias.3, not an empty string). ucd-snmp 4.2.6 router is Cisco 2511 with IOS 11.1(5) (don't suppose it matters, but just in case...) -- Edit this bug report at http://bugs.php.net/?id=23685&edit=1
#18152 [Opn->Csd]: Feature Request SNMP V3
ID: 18152 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Feature/Change Request Operating System: Any PHP Version: 4.2.1 New Comment: SNMPv3 is supported from the next version to be released, version 4.3.0. Previous Comments: [2002-07-03 18:31:09] [EMAIL PROTECTED] Just a Feature Request... It will be nice to have SNMP V3 Support on PHP. -- Edit this bug report at http://bugs.php.net/?id=18152&edit=1
#17405 [Csd->Fbk]: Support netsnmp (http://www.netsnmp.org/), Previously known as "ucd-snmp".
ID: 17405 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Closed +Status: Feedback Bug Type: Feature/Change Request Operating System: Linux PHP Version: 4.2.1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip NET-SNMP is supported now. It will be in the general release from 4.3. Previous Comments: [2002-12-02 04:01:43] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip NET-SNMP is supported now. It will be in the general release from 4.3. [2002-05-27 17:15:28] [EMAIL PROTECTED] Changed summary/category. [2002-05-27 13:03:38] [EMAIL PROTECTED] Ah, I changed VersionInfo to NetSnmpVersionInfo in ext/snmp/snmp.c too. [2002-05-27 13:00:57] [EMAIL PROTECTED] I change directory from snmp.c, so it take files correctly and modify configure script to use -lnetsnmp and not -lsnmp [2002-05-24 05:16:03] [EMAIL PROTECTED] Hmm, looking at things a bit more in detail and basing myself on what I see in the configure script... A detail to mention, the snmp.h file is located in /usr/local/include/net-snmp/library/ while the files that it fails to find at compilation time are located either in /usr/local/include/net-snmp/ (version.h) or /usr/local/include/net-snmp/library/ (asn.h, snmp_api.h, snmp_client.h, snmp_impl.h, snmp.h, parse.h, mib.h)... 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/17405 -- Edit this bug report at http://bugs.php.net/?id=17405&edit=1
#17405 [Opn->Csd]: Support netsnmp (http://www.netsnmp.org/), Previously known as "ucd-snmp".
ID: 17405 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Feature/Change Request Operating System: Linux PHP Version: 4.2.1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip NET-SNMP is supported now. It will be in the general release from 4.3. Previous Comments: [2002-05-27 17:15:28] [EMAIL PROTECTED] Changed summary/category. [2002-05-27 13:03:38] [EMAIL PROTECTED] Ah, I changed VersionInfo to NetSnmpVersionInfo in ext/snmp/snmp.c too. [2002-05-27 13:00:57] [EMAIL PROTECTED] I change directory from snmp.c, so it take files correctly and modify configure script to use -lnetsnmp and not -lsnmp [2002-05-24 05:16:03] [EMAIL PROTECTED] Hmm, looking at things a bit more in detail and basing myself on what I see in the configure script... A detail to mention, the snmp.h file is located in /usr/local/include/net-snmp/library/ while the files that it fails to find at compilation time are located either in /usr/local/include/net-snmp/ (version.h) or /usr/local/include/net-snmp/library/ (asn.h, snmp_api.h, snmp_client.h, snmp_impl.h, snmp.h, parse.h, mib.h)... [2002-05-24 05:01:53] [EMAIL PROTECTED] With the net-snmp package replacing ucd-snmp (well, simply a new name), is there any possibility to add support for this package? I've tried to make it work, but I basically run into issues when compiling as it seems it just can't find the include files which are located in /usr/local/include/net-snmp by default. Looking around, I see the configure script has some paths specified where to look for snmp include files, and the paths in there relate to ucd-snmp but there's no mention of net-snmp. Any chance of getting this added? This is loosely the same issue as bug #13821, as far as the type goes. Thanks! -- Edit this bug report at http://bugs.php.net/?id=17405&edit=1