Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8382341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:54:34+00:00 2026-06-09T16:54:34+00:00

I’m writing a php script that allows me to get and set certain values

  • 0

I’m writing a php script that allows me to get and set certain values on a device using snmp. I’ve got the the device’s MIB and can load it easily into php. The problem is that I can’t get the values I’m looking for using a ‘human readable’ oid string instead of a numeric one (the numeric oid works fine).

my code:

$host = "localhost";
$community = "public";
$mibFile = "C:\wamp\www\extra\AvenueMIBv105.mib";
$oid = '.1.3.6.1.4.1.19021.1.1.0.0.1';
snmp_read_mib($mibFile);

print_r(snmprealwalk($host, $community, $oid));

with $oid = '.1.3.6.1.4.1.19021.1.1.0.0.1', I get this output:

Array ( [AvenueMIBv105::private.1.19021.1.1.0.0.1.1.0] => INTEGER: 1 [AvenueMIBv105::private.1.19021.1.1.0.0.1.2.0] => INTEGER: 1

with $oid = ‘AvenueMIBv105::private.slotSelect’ I get this output:

Array([AvenueMIBv105::internet.2.1.1.3.0] => INTEGER: 129663870
[AvenueMIBv105::internet.2.1.1.4.0] => Hex-STRING: 75 73 65 72 4E 61
6D 65 00

I want both outputs to be the same. I realise that I must have the ‘human readable’ oid wrong, but I’ve tried loads of different strings for that and I always get the same wrong output. How should I be doing this? Also I know it sometimes makes a difference, the php script is running on a WAMP server.

Here is my MIB tree:

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:54:35+00:00Added an answer on June 9, 2026 at 4:54 pm

    Your PHP library needs to be able to ‘resolve’ your OID to a the human readable OID name. You need to research if and how your PHP SNMP library does this for its output. This is an issue with your PHP SNMP library. If your library doesn’t do this, then you will need to manually do it. The reason why your IReasoning browser does it, is because the Ireasoning resolves the OID to the human-readable name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.