#38613 [NEW]: SNMP issues via Apache but ok via PHP CLI
From: neil at fissure dot net
Operating system: CentOS release 4.3
PHP version: 5.1.5
PHP Bug Type: SNMP related
Bug description: SNMP issues via Apache but ok via PHP CLI
Description:
------------
Similar to bug:
#32680 PHP_MSHUTDOWN PHP_MINIT
PHP gives errors when used as an Apache Module, but the
same source code works via PHP CLI
Reproduce code:
---------------
error_reporting(E_ALL);
$host = "xxx";
$community = "xxx";
$syscontact = snmpget($host, $community, "system.sysName.0");
PRINT "<BR>$syscontact\n";
Expected result:
----------------
<BR>STRING: 7200
Actual result:
--------------
Warning: snmpget() [function.snmpget]: Could not open
snmp connection: Unknown host in /usr/local/apache/
htdocs/xxx/snmpwalk.php3 on line 9
I'm running:
PHP Version 5.1.6
'./configure' '--with-mysql' '--with-mysqli' '--enable-
mbstring' '--with-zlib-dir=/usr' '--with-curl' '--with-
snmp' '--with-apache=../apache_1.3.37' '--enable-ucd-
snmp-hack'
('--enable-ucd-snmp-hack' was added in troubleshooting)
Using:
Name : net-snmp
Arch : i386
Version: 5.1.2
Release: 11.EL4.6
Once, but only once stracing the httpd process, I saw:
write(2, "No support for requested transpo"..., 48) = 48
which I believe came from net-snmp
--
Edit bug report at http://bugs.php.net/?id=38613&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38613&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38613&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38613&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38613&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=38613&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38613&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38613&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38613&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38613&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38613&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=38613&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=38613&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38613&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38613&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38613&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38613&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38613&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38613&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38613&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38613&r=mysqlcfg
Thread (7 messages)
- neil at fissure dot net