php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23321 snmpwalk() returns wrong result
Submitted: 2003-04-23 13:22 UTC Modified: 2003-04-29 10:21 UTC
From: kvn@php.net Assigned:
Status: No Feedback Package: SNMP related
PHP Version: 4.3.1 OS: FreeBSD 4.7-RELEASE-p10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
45 + 14 = ?
Subscribe to this entry?

 
 [2003-04-23 13:22 UTC] kvn@php.net
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 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-24 03:14 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip


And maybe update your ucd-snmp to net-snmp..

 [2003-04-29 10:21 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 17:01:29 2024 UTC