php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10397 Cannot get, set or walk on different subtree than .iso.3.6.1.2.1
Submitted: 2001-04-19 07:09 UTC Modified: 2001-07-13 01:21 UTC
From: tlechat at ccf dot com Assigned:
Status: Closed Package: SNMP related
PHP Version: 4.0.4 OS: W2000
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 !
Your email address:
MUST BE VALID
Solve the problem:
36 + 6 = ?
Subscribe to this entry?

 
 [2001-04-19 07:09 UTC] tlechat at ccf dot com
If seems that a default OID (.iso.3.6.1.2.1)  is always added to OID parameter when I call snmpget or snmpwalk.

Example, If I try :

snmpget("myhost","public","1.3.6.1.2.3.1191.1.2"),

it will try to get .iso.3.6.1.2.1.1.3.6.1.2.3.1191.1.2
so it fails....
with warning ".iso.3.6.1.2.1.1.3.6.1.2.3.1191.1.2" doesn't exists

I modify php_snmp.dll when I saw with an dll editor the string .1.3.6.1.2.1 inside and I replace first of his char by \0, from now, it works fine, I can get different OID.

Bonus Question : What is snmprealwalk() function ? There is no information in documentation. It seems that it does same function that snmpwalkoid. Right ?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-19 14:16 UTC] tlechat at ccf dot com
PRECISION :
In my previous mail I wrote that 
snmpget("myhost","public","1.3.6.1.2.3.1191.1.2")

will fails with warning ".iso.3.6.1.2.1.1.3.6.1.2.3.1191.1.2" doesn't exists

But the exact warning is :

Warning: Invalid object identifier: 1.3.6.1.2.3.1191.1.2

So it could be really an incorrect object identifier, but a simple 
snmpwalkoid on same machine can show you that it starts always on iso.3.6.1.2.1. if you specify no OID, and it fails if you specify OID (for example try with .1 or .iso)

Please note that my correct email is tlechat@ccf.fr (sorry)

Regards
 [2001-07-13 00:27 UTC] rasmus@php.net
Start your OID with a .
ie. snmpget("myhost","public",".1.3.6.1.2.3.1191.1.2")
 [2001-07-13 01:21 UTC] rasmus@php.net
By the way, this has nothing to do with PHP.  This happens in the snmp library.  So there is nothing to fix here.  Just use the leading . if you want to specify absolute oids
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Sep 16 10:01:36 2019 UTC