|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-07-31 08:06 UTC] phdokc at yahoo dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 02:00:01 2025 UTC |
Description: ------------ Compiled NET-SNMP 5.2.1.2, APACHE 2.0.54 and PHP 4.40 from snap shot and any snmpwalk, snmpget or snmpset under apache returns Invalid object identifier whether using ASN dotted notation or mib text value. Run same script using php cli and it works perfect? All other PHP functions including MYSQL are working as expected. This is also code that has been in production for over a year. Just moving to HPUX 11.23 IA64 platform from HPUX 11.11 PA-RISC platform. I have also tried Apache 2.0.50 (self compiled and from HP Depot), NET-SNMP 5.2, PHP 4.3.8, 4.3.11 and 4.4.1-dev. I have search www high and low looking for anyone with simalar issue but only found people who had mis-configured net-snmp. I am 100% confident in my net-snmp configuration / community strings and the fact that the php cli works seems to support my evaluation. I also compiled all versions trying HPUX bundled aCC, GCC 3.4.3 self-compiled and GCC 3.4.3 binary from HPUX porting archive center. Do you feel this to be a bug? Any help would be appriciated. Reproduce code: --------------- <? $host = "switch1"; $community = "private"; $test1 = snmpget("$host","$community","sysDescr.0"); $test2 = snmpget("$host","$community","1.3.6.1.2.1.1.1.0"); echo $test1; echo "<br><br>$test2"; ?> Expected result: ---------------- To return the sysDescr twice. Actual result: -------------- Under PHP CLI, you get the sysDescr twice as expected. Under APACHE you get; Warning: snmpget(): Invalid object identifier: sysDescr.0 in /apache/httpd/php/nocmon4/pstable/test.php on line 4 Warning: snmpget(): Invalid object identifier: 1.3.6.1.2.1.1.1.0 in /apache/httpd/php/nocmon4/pstable/test.php on line 5