problem with snmp and php

Problems with the Windows version of XAMPP, questions, comments, and anything related.

problem with snmp and php

Postby djamols » 09. October 2008 12:28

hello;

i install xampp server and modify the file php.ini in /apache/bin directory to load the php-snmp module,
but when i launch the script to see how is going well i got a error message, that is:

Warning: snmpwalk() [function.snmpwalk]: No response from 127.0.0.1 in C:\Program Files\xampp\htdocs\yan\snmpwalk.php on line 2

Warning: Invalid argument supplied for foreach() in C:\Program Files\xampp\htdocs\yan\snmpwalk.php on line 4


for the script,

Code: Select all
<?php
$a = snmpwalk("127.0.0.1", "public", "");

foreach ($a as $val) {
    echo "$val\n";
}

?>


i don't inderstand why the localhost don't give response to that request, may i have a answer, thx
Last edited by djamols on 09. October 2008 13:14, edited 1 time in total.
djamols
 
Posts: 2
Joined: 09. October 2008 11:56

Postby Wiedmann » 09. October 2008 12:48

i want to use php for monitoring a cisco switch with
Code: Select all
Warning: snmpwalk() [function.snmpwalk]: No response from 127.0.0.1

"127.0.0.1" can't be the IP from the cisco switch.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

problem with snmp and php

Postby djamols » 09. October 2008 13:09

sorry, for the beginning, i try i for the loopback , i forgot to say it, if it running for the localhost, it will run probably for the switch, when i change the ip address,
djamols
 
Posts: 2
Joined: 09. October 2008 11:56


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 47 guests