ID:               32680
 Updated by:       [EMAIL PROTECTED]
 Reported By:      dejan at akton dot si
-Status:           Open
+Status:           Assigned
 Bug Type:         SNMP related
 Operating System: Linux 2.4.26
 PHP Version:      4.3.11
-Assigned To:      
+Assigned To:      harrie
 New Comment:

Assigning to Harrie, he seems to be maintaining ext/snmp.


Previous Comments:
------------------------------------------------------------------------

[2005-04-12 10:18:46] dejan at akton dot si

Description:
------------
In 4.3.11 someone added a PHP_MSHUTDOWN(snmp) to ext/snmp/snmp.c
extension. I'm not so familiar with the PHP source it self, but here's
what I see.
In CLI version, PHP_MINIT() and PHP_MSHUTDOWN works as expected, when
script starts PHP_MINIT() is called which initialized the snmp API and
when script is done, PHP_MSHUTDOWN is called, which clears the instance
of snmp API. But under Apache there's a problem.
When apache starts, it calls PHP_MINIT() but it also calls
PHP_MSHUTDOWN, which clears the instance. When you request a script via
Apache, the PHP_MINIT() is not called and SNMP Api is not initialized
and I receive strange errors. 

Reproduce code:
---------------
$foo = snmpget('127.0.0.1', 'public', 'system.SysContact.0');

Expected result:
----------------
Output from system.SysContect.0

Actual result:
--------------
Invalid OID and invalid host. From the SNMP API I receive: 
No support for requested transport domain "udp".
And this is because the API was not initialized and transport domains
were not loaded!


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32680&edit=1

Reply via email to