title: php snmp MIB and walk
body: <p>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).</p>
  
  <p>my code:</p>
  
  <pre><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));
  </code></pre>
  
  <p>with <code>$oid = '.1.3.6.1.4.1.19021.1.1.0.0.1'</code>, I get this output:</p>
  
  <blockquote>
    <p>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 </p>
  </blockquote>
  
  <p>with $oid = 'AvenueMIBv105::private.slotSelect' I get this output:</p>
  
  <blockquote>
    <p>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</p>
  </blockquote>
  
  <p>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.</p>
  
  <p>Here is my MIB tree:</p>
  
  <p><img src="https://i.stack.imgur.com/eZ1vd.png" alt="enter image description here"></p>