PHP SNMP - 找不到模块 [英] PHP SNMP - Cannot find module
问题描述
我已经启用SNMP模块试图模块中的功能。我已经设置了MIBDIRS环境变量的地方,我有我的MIB,但我还是让这些找不到模块警告:
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 "Cannot find module" warnings:
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
我知道我曾经固定的,但我似乎无法再修复它......我还能尝试一下呢?
I know I have fixed this once but I can't seem to fix it again...what else can I try?
我在Windows上。
I'm on Windows.
推荐答案
显然有可以设置2环境变量。一个是 MIBDIRS
这是所有MIB文件。另一种是 MIBS
,我相信这是你要加载的SNMP模块。通过设置 MIBS
到所有
,我能够摆脱错误的。
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.
这篇关于PHP SNMP - 找不到模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!