[PHP] SNMPGET returns Invalid object identifier: .1.3.6.1.2.1.1.1.0

2003-02-13 Thread Mike Lindsay
Hey All,

Ok I've been going nuts (as well as spending 6hours) trying to figure out
what's going on with this.

When I poll my switch from the commandline using net-snmp's snmpget tool I
get the proper response:

adxitutil1# ./snmpget -v 1 -c public xxx.xxx.xxx.xxx 1.3.6.1.2.1.1.1.0

SNMPv2-MIB::sysDescr.0 = STRING: Cisco Internetwork Operating System
Software
IOS (tm) C3500XL Software (C3500XL-C3H2S-M), Version 12.0(5.2)XU,
MAINTENANCE INTERIM SOFTWARE
Copyright (c) 1986-2000 by cisco Systems, Inc.
Compiled Mon 17-Jul-00 18:29 by ayounes

Now, when I do the SNMPGET call from PHP:

$a = snmpget(10.1.0.11, public, .1.3.6.1.2.1.1.1.0);
echo A == $a BR;

I get:

Warning: snmpget() [function.snmpget]: Invalid object identifier:
.1.3.6.1.2.1.1.1.0 in /usr/local/apache2/htdocs/snmpget_test.php on line 11

Yet:

$a = snmpwalkoid(xxx.xxx.xxx.xxx, public, );
for (reset($a); $i = key($a); next($a)) {
echo $i: $a[$i]br\n;
}

Returns:

SNMPv2-MIB::sysDescr.0: Cisco Internetwork Operating System Software IOS
(tm) C3500XL Software (C3500XL-C3H2S-M), Version 12.0(5.2)XU, MAINTENANCE
INTERIM SOFTWARE Copyright (c) 1986-2000 by cisco Systems, Inc. Compiled Mon
17-Jul-00 18:29 by ayounes
SNMPv2-MIB::sysObjectID.0: SNMPv2-SMI::enterprises.9.1.248
SNMPv2-MIB::sysUpTime.0: 229:1:20:43.90
SNMPv2-MIB::sysContact.0:
SNMPv2-MIB::sysName.0: is.good.beer.com

SNIP

I am running:

FreeBSD5.0
Apache-2.0.44
PHP-4.3.0
net-snmp-5.0.6

(I have also tried net-snmp-5.0.7, net-snmp-5.0.4, net-snmp-5.0.0 and
ucd-snmp-4.2.x with the same results.

 #define NO_ZEROLENGTH_COMMUNITY 1  has been uncommented in net-snmp-5.0.6's
acconfig.h file

and PHP was configured with:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-snmp=/usr/local 
--with-gd=/usr/local --with-png-dir=/usr/local --with-zlib-dir=/usr/local

*whimper* help!

Has anyone seen this behaviour before? The scripts that I am using for
testing work fine on my windows server with php, apache, and mysql...any
suggestions aside from formating and rebuilding the box with an older OS and
apps?

Cheers,
Mike Lindsay
[EMAIL PROTECTED]



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




[PHP] snmpget

2002-12-28 Thread Gareth Hastings
I can't get this to work, I'm using RH 8 with php 4.2.2.

Is there a way to fix this? I think its something to do with ucd-snmp
and me needing to use net-snmp but I'm not sure.

Any ideas?

Thanks



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




[PHP] snmpget errors

2002-04-02 Thread Simon Stiefel

Hi there,

First of all, the snmpset-function works without any problems.
But I've got that problem with the snmpget-function.
The return value is s.th. like that: Ôÿ¿EÔÿ¿.

Cool, huh?

The command-line snmpget works also very fine.

Any hints?

Thanks in advance.

Greets, Simon

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