|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-08-27 02:26 UTC] neil at fissure dot net
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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 16:00:02 2025 UTC |
Commenting out this line, in the PHP_MSHUTDOWN_FUNCTION(snmp) function of: src/web/php-5.1.6/ext/snmp/snmp.c diff snmp.c snmp.c.orig 223c223 < /* snmp_shutdown("snmpapp"); */ --- > snmp_shutdown("snmpapp"); but possibly at the risk of re-introducing the memory leak it was added to combat?