#32680 [Asn->Fbk]: PHP_MSHUTDOWN PHP_MINIT
| From: | sniper@php.net | Date: | Sat, 23 Apr 2005 21:31:36 +0000 |
| Subject: | #32680 [Asn->Fbk]: PHP_MSHUTDOWN PHP_MINIT | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-78090@lists.php.net to get a copy of this message | ||
ID: 32680
Updated by: sniper@php.net
Reported By: dejan at akton dot si
-Status: Assigned
+Status: Feedback
Bug Type: SNMP related
Operating System: *
PHP Version: 4CVS, 5CVS (2005-04-15)
Assigned To: sniper
New Comment:
I can not reproduce this. What apache version are you using?
What configure line did you use with PHP?
Previous Comments:
------------------------------------------------------------------------
[2005-04-15 14:04:28] sniper@php.net
It was me who added the MSHUTDOWN() to get rid of the
memleaks..fixing.
------------------------------------------------------------------------
[2005-04-12 10:27:57] tony2001@php.net
Assigning to Harrie, he seems to be maintaining ext/snmp.
------------------------------------------------------------------------
[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