2009-06-18 108 views
5

run.php只是一個普通的PHP文件:如何關閉這些PHP警告?

[[email protected] robot]# php run.php 
No log handling enabled - turning on stderr logging 
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none) 
Cannot find module (HOST-RESOURCES-TYPES): At line 0 in (none) 
Cannot find module (UCD-DISKIO-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 (MTA-MIB): At line 0 in (none) 
Cannot find module (NETWORK-SERVICES-MIB): At line 0 in (none) 
Cannot find module (LM-SENSORS-MIB): At line 0 in (none) 
Cannot find module (IP-MIB): At line 0 in (none) 
Cannot find module (IF-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 (DISMAN-EVENT-MIB): At line 0 in (none) 
Cannot find module (DISMAN-SCHEDULE-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 (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-VIEW-BASED-ACM-MIB): At line 0 in (none) 
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none) 
Cannot find module (IPV6-ICMP-MIB): At line 0 in (none) 
Cannot find module (IPV6-MIB): At line 0 in (none) 
Cannot find module (IPV6-TCP-MIB): At line 0 in (none) 
Cannot find module (IPV6-UDP-MIB): At line 0 in (none) 
Cannot find module (IP-FORWARD-MIB): At line 0 in (none) 
Cannot find module (NET-SNMP-EXTEND-MIB): At line 0 in (none) 
Cannot find module (UCD-DLMOD-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) 
Cannot find module (NET-SNMP-VACM-MIB): At line 0 in (none) 
+0

能否請您發表您的操作系統?它可能有助於給你提供安裝SNMP MIB庫和/或根據需要更新PHP配置的說明。 – defines 2009-06-18 12:52:58

+0

我有同樣的問題。出於某種原因,我已啓用SNMP模塊加載到php.ini中。現在說出php.ini並罰款。 – James 2011-03-01 11:37:07

回答

0

看來你的php.ini文件配置錯誤,加載不存在的模塊。

6

根據this post,您沒有安裝正確的SNMP管理信息庫。爲您的Linux發行版安裝正確的軟件包,如net-snmp

2

當某件事給你帶來錯誤時,最壞的方法就是「關閉它們」。如果您的汽車儀表板上的應急指示燈亮起,您是否可以獲得服務或者是否擰開燈泡?

+2

只關閉錯誤和關閉事物之間存在着很大的區別 - 您不使用這些錯誤。 – WiseOldDuck 2012-07-25 17:50:23

1

如果這是一個Windows安裝程序,你可以去add/remove programs(或program features)和PHP程序做變化choose item to install下確保已取消選中extention SNMP和其他你不需要的擴展。

完成安裝嚮導。之後,做一個iisreset