#23321 [NEW]: snmpwalk() returns wrong result
| From: | kvn@php.net | Date: | Wed, 23 Apr 2003 18:22:47 +0000 |
| Subject: | #23321 [NEW]: snmpwalk() returns wrong result | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-38229@lists.php.net to get a copy of this message | ||
From: kvn@php.net
Operating system: FreeBSD 4.7-RELEASE-p10
PHP version: 4.3.1
PHP Bug Type: SNMP related
Bug description: snmpwalk() returns wrong result
router IOS:
Cisco Internetwork Operating System Software
IOS (tm) 3600 Software (C3660-JK8O3S-M), Version 12.2(12), RELEASE
SOFTWARE (fc1)
mordor:21:07:/home/www/data/noc/fclients #pkg_info | grep snmp
ucd-snmp-4.2.6 An extendable SNMP implementation
mordor:21:07:/home/www/data/noc/fclients #
snmpwalk belegost citius ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.1 =
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.2 = INTERNAL
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.3 =
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.4 =
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.5 =
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.6 = NOC
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.7 = UA-IX
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.8 = AS-HEADS
....
there is PHP code:
<?
$hostname = belegost ;
$community = citius ;
$object_id_1 = "ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias" ;
$ifAlias = snmpwalk ($hostname, $community, $object_id_1) ;
print_r($ifAlias);
?>
Result:
Array
(
[0] => Tã¹¹^Uþ¿(
[1] => INTERNAL
[2] => INTERNAL
[3] => INTERNAL
[4] => INTERNAL
[5] => NOC
[6] => UA-IX
[7] => AS-HEADS
...
Interfaces 0, 2, 3, 4 does not have descriptions on the router too. But
php's snmpwalk returns INTRNAL (something unreadable for i-face 0)
But php
--
Edit bug report at http://bugs.php.net/?id=23321&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23321&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23321&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23321&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23321&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23321&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23321&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23321&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23321&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23321&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23321&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23321&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23321&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23321&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23321&r=gnused