ID: 34447
User updated by: p dot burkhalter at gmx dot net
Reported By: p dot burkhalter at gmx dot net
Status: Open
Bug Type: SNMP related
Operating System: SunOS 5.8
PHP Version: 5.1.0RC1
New Comment:
btw: Apache shared module version is working.
apache:
./configure --prefix=/opt/apache/1.3.33 \
--enable-module=so
php:
./configure --prefix=/opt/apache/1.3.33 \
--with-apxs=/opt/apache/1.3.33/bin/apxs \
--with-libxml-dir=/opt/apache/1.3.33 \
--with-snmp=/opt/apache/1.3.33
Problem occurs only by the static module installation.
Previous Comments:
------------------------------------------------------------------------
[2005-09-09 20:36:28] p dot burkhalter at gmx dot net
Description:
------------
While executing a simple php-script started by apache, the php
function:
snmpget(string hostname, string community, string object_id)
Returns FALSE and produces a warning.
The test-script is working well, when I run it on the command line by
the php-binary => php proto.php
The bug is similiar to Bug #32680
But it look's like it still exists a problem.
Reproduce code:
---------------
<?
print snmpget("1.2.3.4", "secret", "system.sysUpTime.0")."\n";
?>
Expected result:
----------------
Timeticks: (56916419) 6 days, 14:06:04.19
Actual result:
--------------
It look's like the snmp-api won't proper initialized..
When you set doDebugging to 1 in the snmp.conf, you can see, that the
'domain_list' in snmplib/snmp_transport.c on line 346 don't match to
"udp", because domain_list is NULL.
I tested it right now with net-snmp-5.2.1.2, but the problem exists
with older versions too.
All what I do was installing libxm2 and libsnmp with a ordinary
./configure --prefix=/opt/apache/1.3.33 && make && make install &&
smile
after this installing php:
./configure --prefix=/opt/apache/1.3.33 --with-snmp=/opt/apache/1.3.33
--with-libxml-dir=/opt/apache/1.3.33 --without-pear
--with-apache=../apache_1.3.33
make && make install && smile
and apache:
./configure --activate-module=src/modules/php5/libphp5.a
--prefix=/opt/apache/1.3.33
make && make install && smile
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34447&edit=1