Re: PHP & SNMP
| From: | Chris | Date: | Wed, 24 May 2006 03:15:05 +0000 |
| Subject: | Re: PHP & SNMP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-236796@lists.php.net to get a copy of this message | ||
Pavleck, Jeremy D. wrote:
Greetings, Seem to have a bit of a problem I can't figure out. I'm trying to query servers via SNMP with PHP's snmpget function. Everything seems to work fine, no problems at all - except I'd like the web page to print the string value instead of the numeric value (I.E. OK for the Compaq Drive Array vs 1). Now I've configured everything as best I can tell, and I have the page loading the appropriate MIB file ( snmp_read_mib("/usr/local/share/snmp/mibs/CPQIDA.MIB")). Running it from the terminal via 'php mypage.php' returns all the correct values, I see "Ok", instead of "1". But accessing it via the web produces nothing - no output. It doesn't matter how I set the get, I've tried varying it with "CPQIDA-MIB::cpqDaCntlrBoardStatus.0", "cpqDaCntlrBoardStatus.0", ".iso.org.dod.internet.private.enterprises.compaq.cpqDriveArray.cpqDaCom ponent.cpqDaCntlr.cpqDaCntlrTable.cpqDaCntlrEntry.cpqDaCntlrBoardStatus. 0" - all work fine running it via the terminal, but not via the web page.Does the webpage show anything at all? Sounds like you have a fatal error.. Does the web php version have snmp support? Check with a phpinfo page. -- Postgresql & php tutorials http://www.designmagick.com/