ID: 38613 Updated by: [EMAIL PROTECTED] Reported By: neil at fissure dot net -Status: Open +Status: Feedback Bug Type: SNMP related Operating System: CentOS release 4.3 PHP Version: 5.1.5 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2006-08-30 17:52:38] neil at fissure dot net 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? ------------------------------------------------------------------------ [2006-08-30 16:56:20] neil at fissure dot net I figured it was a PHP issue as it matched a similar bug report which was acknowledged to be due to a code change in PHP. In that bug, sniper AT php.net, who make the change, said they were using Apache 2 (and would test with Apache 1.x if they got a chance). So I'm figuring this issue lies with PHP and Apache 1.x I'm happy to do any requested testing/diagnostics if you can give me some pointers. I'm getting the same errors as in bug 32680 (which was acknowledged to be a PHP issue, not say an Apache issue). Thanks for your time, Neil. ------------------------------------------------------------------------ [2006-08-28 06:22:20] [EMAIL PROTECTED] Why do you think it's a PHP issue? ------------------------------------------------------------------------ [2006-08-27 02:26:12] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38613&edit=1