net-snmp + php5 apache module

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bill

    net-snmp + php5 apache module

    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 5.2.1.2. (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.snmpge t]: 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
    difference.

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


    Thanks,

    -Bill
Working...