php snmpget

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

Threaded View

No one could answer my question lately, so maybe today I will have some luck :-)
Here we go again:

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'


Re: php snmpget wrote:
Quoted text here. Click to load it

I can't duplicate this. My second response is empty, as it should be. Using
php-4.3.8 but I doubt that matters. What version of SNMP are you using?

Site Timeline