php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33934 snmp functions not working under apache
Submitted: 2005-07-31 05:45 UTC Modified: 2005-08-01 09:52 UTC
From: phdokc at yahoo dot com Assigned:
Status: Not a bug Package: SNMP related
PHP Version: 4.4.0 OS: HPUX 11.23
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: phdokc at yahoo dot com
New email:
PHP Version: OS:

 

 [2005-07-31 05:45 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-31 08:06 UTC] phdokc at yahoo dot com
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 20:01:31 2024 UTC