snmpget weirdnes

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


I noteced a weird problem with php snmpget. When I get two different consecutive
queries from Cisco box (actualy, any box) and if the first returned value is not
empty, but the second one is empty, then php shows exactly the same value for
second snmpget as for the first one. If I perform snmpget from linux shell,
everything is OK:

from shell:

[root]# snmpget public sysName.0
[root]# system.sysName.0 = ruter1

[root]# snmpget public sysLocation.0
[root]# system.sysLocation.0 =

but with php:

$a = snmpget('', 'public', 'sysName.0');
$b = snmpget('', 'public', 'sysLocation.0');

echo "a = $a" => I get: a = ruter1

echo "b = $b" => I get: b = ruter1

Can anyone tell me why is that?

PHP Version 4.3.2
'./configure' '--with-snmp'


Site Timeline