PHP SNMP - Cannot find module

前端 未结 8 1094
逝去的感伤
逝去的感伤 2020-12-17 16:50

I\'ve enabled the SNMP module was trying to the functions in the module. I have set the MIBDIRS environment variable to where I have my mibs but I\'m still getting these \"

相关标签:
8条回答
  • 2020-12-17 17:16

    Apparently there are 2 environment variables you can set. One is MIBDIRS which is where all the MIB files are. Another is MIBS, which I believe is which SNMP modules you want to load. By setting MIBS to ALL, I was able to get rid of the errors.

    0 讨论(0)
  • 2020-12-17 17:18

    The php package doesn't include mibs folder, what you have to do is download the source file of net-snmp and copy the folder into your php directory

    download link https://sourceforge.net/projects/net-snmp/files/net-snmp/5.7.3/

    after that, unzip the zip file and copy the mibs folder to your php directory

    for exmaple,copy it to C:\PHP\Extras\mibs
    Thne add a new system variable called MIBDIRS. Its value should be: C:\PHP\Extras\mibs

    Finally, you can run php -m

    and you issue will be resoved

    I attach a screenshot for your reference.

    0 讨论(0)
提交回复
热议问题