I\'m using Ubuntu 13.10 and php is installed and working perfectly. But, when I type php in the terminal, it lists a lot of errors (and after that, it goes to w
I spent a few hours on this and wanted to share how I solved it in case someone searches for this error and still needs to use php-snmp module (removing that module also removes the error).
/etc/snmp/snmp.conf has a setting: mibs ALL
This tells the net-snmp library to attempt to load every mib file. If you do not need this you can comment that out and the errors are gone. If you still want to load every mib file continue reading.
In ubuntu 16.04 setting the environment MIBDIR to /usr/share/mibs stopped these errors for me. I needed this to happen on every session for php CLI runs so I created
/etc/profile.d/mibs.sh with: export MIBDIRS=/usr/share/mibs
No more php errors from CLI.
To disable the error for cronjobs I added the same ENV in the cron file where the errors were happening.
If someone knows why not setting MIBDIRS causes these errors, I would love to hear. I can only assume the default for this in net-snmp are not compatible with ubuntu 16.04 mibs downloader.