From: phdokc at yahoo dot com Operating system: HPUX 11.23 PHP version: 4.4.0 PHP Bug Type: SNMP related Bug description: snmp functions not working under apache
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 -- Edit bug report at http://bugs.php.net/?id=33934&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33934&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33934&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33934&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33934&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33934&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33934&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33934&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33934&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33934&r=support Expected behavior: http://bugs.php.net/fix.php?id=33934&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33934&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33934&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33934&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33934&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33934&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33934&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33934&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33934&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33934&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33934&r=mysqlcfg