Forum Moderators: coopster
"Warning: snmpget() [function.snmpget]: Error in packet: (noSuchName) There is no such variable name in this MIB. in C:\SNMP\index.php on line 15"
I have no idea why since it's working fine with the default MIBs. Anyone care to help? Thanks!
So no, nothing around to really help me utilize those functions.
I'm guessing that you have net-snmp or ucd-snmp installed so I won't go there. Your problem is more than likely you have a call something like this
$snmp = snmpwalk('$hostname','$community','textmibvalue');
Try something like this and see if it works.
$snmp = snmpwalk('$hostname','$community','1.3.6.1.#*$!');
using the dotted notation ASN.1 value of the mib.
If the dotted notation works you will need to add the 'textmibvalue' to net-snmp / ucd-snmp using snmptranslate, otherwise you will get the results you stated above. To add mibs to net-snmp check the net-snmp site but it goes something like this off the top of my head.
Add the mib to net-snmp with this command
echo "mibs +SNMP-MIB-NAME" >> /pathtonet-snmp/snmp/snmp.conf
Then add the entity to net-snmp with this command
snmptranslate -m +SNMP-MIB-NAME -IR snmpEntityName
Here is a real life senario.
echo "mibs +CISCO-STACK-MIB" >> /usr/local/share/snmp/snmp.conf
then
snmptranslate -m +CISCO-STACK-MIB -IR portOperStatus
Hope this helps.
phdokc