Try using it with the oid and add a .0 at the end of the mib.

Example:

        echo snmpget( "localhost", "public", "1.3.6.1.2.1.1.1.0" );
        Need to have a zero at the end of MIB...

Check to make sure that you have snmpd running on your system or try it on
another system that has snmp set up.


Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 20, 2002 10:38 AM
To: [EMAIL PROTECTED]
Subject: [PHP-INST] Problems with SNMP


Hi, I have a rather strange problem with UCD-SNMP.
I use PHP 4.1.1 and UCD-SNMP 4.2.3


If I make a line like this :

     echo snmpget("localhost", "public", "system.sysDescr.0");

...then I get a "Document contains no data" in the browser or at best a
message saying that the OID doesn't exist (which it does)

If I change to :

     echo snmpget("localhost", "public", ".1.3.6.1.2.1.1.1");

...or :

     echo snmpget("localhost", "public", "1.3.6");


...then I get the same.


...but if I look in phpinfo() ( http://statdb.dassic.com/phpinfo.php ) then
it's enabled, and I have the ucd-snmp-hack option in my configure...

On another machine running RedHat 6.2 buth with the same PHP & UCD-SNMP, it
only worked with 1.3.6 and gave a wrong result.


What's wrong ?


/Jesper


-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to