Пакет Net-SNMP для Windows содержит файлы для поддержки SNMP в директории mibs. Эту директорию необходимо добавить в переменные окружения Windows с именем MIBDIRS и значением равным полному пути до директории mibs: например, c:\usr\mibs.

add a note add a note

User Contributed Notes 4 notes

4 years ago
There is no "mibs" directory in the php package, I check with 5.2,5.4,5.5 and 5.6, none of them has the net-snmp mibs folder.

What you have to do is download the source of net-snmap and copy the folder into your unpacked php folder besides the instructions provided above

net-snmap download link


after you download, unzip the file and copy folder mibs to your php folder
8 years ago
In order to build and install php in Ubuntu 12.10, beyond the normal "build-essential" package, I had to install the following packages: apache2-prefork-dev  libxml2-dev libsnmp libsnmp-dev libtool

Command line should be like this:

sudo apt-get install apache2-prefork-dev libxml2-dev libsnmp libsnmp-dev libtool
Darren Wolfe
9 years ago
If PHP complains that some mibs are missing and they are not included in your windows php package, they can be obtained from the source package of net-snmp itself.
bug404 at free dot fr
6 years ago
If net-snmp was not installed in default c:\usr folder (which may be the case for most peoples used to Windows instead of Linux), then, you should also create SNMP_PERSISTENT_DIR system environment variable with "persistent" folder location (located in snmp folder).
Otherwise, php will will create its own persistant folder in c:/usr/snmp/persistent folder, which is probably not what you want !
To Top