#33934 [Opn->Csd]: snmp functions not working under apache

From: Date: Sun, 31 Jul 2005 06:06:50 +0000
Subject: #33934 [Opn->Csd]: snmp functions not working under apache
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-82730@lists.php.net to get a copy of this message
ID: 33934 User updated by: phdokc at yahoo dot com Reported By: phdokc at yahoo dot com -Status: Open +Status: Closed Bug Type: SNMP related Operating System: HPUX 11.23 PHP Version: 4.4.0 New Comment: I applied HP patch PHSS_33275 which includes many linker and lib patches, then recompiled gcc, net-snmp, apache and php and now the snmp functions are working under apache. Sorry for the false alarm. I hope no time was spent by the PHP team looking in to this. The PHP team is the best in the open source community and I thank you for all your efforts. Previous Comments: ------------------------------------------------------------------------ [2005-07-31 05:45:38] phdokc at yahoo dot com 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 this bug report at http://bugs.php.net/?id=33934&edit=1

« previous php.bugs (#82730) next »