From:             dejan at akton dot si
Operating system: Linux 2.4.26
PHP version:      4.3.11
PHP Bug Type:     SNMP related
Bug description:  PHP_MSHUTDOWN PHP_MINIT

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 bug report at http://bugs.php.net/?id=32680&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32680&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32680&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32680&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32680&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32680&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32680&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32680&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32680&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32680&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32680&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32680&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32680&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32680&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32680&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32680&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32680&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32680&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32680&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32680&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32680&r=mysqlcfg

Reply via email to