net-snmp + php5 apache module

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I've recently built a new server on which I've tried to configure and
install PHP5 (I've now tried 5.0.4, 5.0.5, and 5.1.0RC1) along with
Apache 1.3.33 and net-snmp  (Building PHP5 as an Apache module)

Everything compiles just fine, but when I try to call any of the SNMP
functions (i.e. snmpget) from a PHP script on a web page, I get the
following error:

Warning: snmpget() [function.snmpget]: Could not open snmp connection: Unknown host in /var/www/test.php on line 5

However, I can execute the same script (which just consists of a simple
snmpget) from the CLI and it works just fine.  It also works fine if I
execute from Apache as a CGI.

If I build the same configuration with PHP 4.4.0, everything works fine
from within the Apache module.  I've tried executing all of this from the
CLI as the Apache user as well and it does not seem to make any

Has anyone else encountered this issue?  Any ideas about what I could
try to fix it?



Site Timeline