#32613 [Csd]: ext/snmp: use of snmp_shutdown() causes snmpapp.conf access errors
ID: 32613
Updated by: sniper@php.net
-Summary: php --version fails with snmpapp.conf access error
Reported By: ric at arizona dot edu
Status: Closed
Bug Type: SNMP related
Operating System: Solaris 8
PHP Version: 4.3.11
New Comment:
Fixed in HEAD/PHP_5_0 branches by disabling the persistent stage stuff.
Thanks for the tip!
Here is the patch:
http://www.php.net/~jani/patches/bug32613.patch
Previous Comments:
------------------------------------------------------------------------
[2005-05-10 13:25:52] sniper@php.net
I have now reverted the memleak fix from PHP_4_3 branch.
------------------------------------------------------------------------
[2005-04-11 23:10:34] sniper@php.net
You can very easily control a) the path b) the owner of that path ->
not PHP bug.
------------------------------------------------------------------------
[2005-04-11 22:39:26] jorton@php.net
I agree this is a regression; you see the spam similarly in the httpd
error_log at each shutdown, if it *can't* create the snmpapp.conf since
it's not running as root (at least using the net-snmp default paths in
Fedora Core).
That looks like a good solution, except it will inhibit *reading* the
config data as well, which might not be desired? I'm not familiar with
this area at all.
------------------------------------------------------------------------
[2005-04-11 20:33:55] ric at arizona dot edu
After much reading on this, I found the problem to be the
snmp_shutdown() call added in php 4.3.11. The fix for the
errors this is twofold
a) modify php to include
netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
NETSNMP_DS_LIB_DONT_PERSIST_STATE, 1);
in php startup, so the newly added snmp_shutdown call
won't try to write data.
-AND-
b) update to net-snmp-5.2.1 which recognizes the above
call.
---
------------------------------------------------------------------------
[2005-04-07 01:51:42] ric at arizona dot edu
I disagree with the "its net-snmp's fault" response. How can it be
net-snmp's problem when php 4.3.10 built with the exact same net-snmp
within a couple of hours of building 4.3.11 does not exhibit the
problem of trying to write to /var/net-snmp???
Isn't it more likely that there was some change php's use of net-snmp
between 4.3.10 and 4.3.11 that triggered this change in behavior?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/32613
--
Edit this bug report at http://bugs.php.net/?id=32613&edit=1
Thread (8 messages)