PHP Module Problem

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
User avatar
pshankland
Cacti User
Posts: 247
Joined: Fri Dec 31, 2004 7:07 am
Location: UK

PHP Module Problem

Post by pshankland »

Hi,

I have just completed a clean installation of Cacti and the various parts and everything seems to work except the poller.

When I run 'php D:\cacti\poller.php' I get the following results and the poller just sits there forever:

Code: Select all

C:\php d:\cacti\poller.php
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 (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): 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 (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)
Any ideas?

Thanks.
User avatar
pshankland
Cacti User
Posts: 247
Joined: Fri Dec 31, 2004 7:07 am
Location: UK

Post by pshankland »

This is obviously a PHP config error as when I run 'php -m' I get he following:

Code: Select all

C:\php -m
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 (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): 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 (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)
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
date
dom
filter
ftp
hash
iconv
json
libxml
mysql
odbc
pcre
Reflection
session
SimpleXML
snmp
sockets
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib

[Zend Modules]
Have gone through php.ini and the Windows install guide but I really am struggling to find what I have done wrong.

I have double checked that I have MIBDIRS pointing to D:\PHP\extras\mibs within my system variables and evening within this directory I have the unknown modules listed.

Thanks.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

You're right, its a problem with the MIBDIRS system variable. From the command prompt type the following and paste the output: set m.

When you did your installation, did you follow my installation guide?
User avatar
pshankland
Cacti User
Posts: 247
Joined: Fri Dec 31, 2004 7:07 am
Location: UK

Post by pshankland »

Thanks for the reply - yeah I followed your install guide.

Output as requested:

Code: Select all

C:\>set m
MIBDIRS=D:\PHP\extras\mibs\
Any clues?
User avatar
pshankland
Cacti User
Posts: 247
Joined: Fri Dec 31, 2004 7:07 am
Location: UK

Post by pshankland »

Found the problem:

In the install docs it says set MIBDIRS to C:\PHP\Extras\mibs\ but should really be C:\PHP\Extras\mibs

Have made this change and now don't get any php errors.

Thanks.

Pete.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Hmm, interesting. Stupid PHP should be able to know they're the same thing.
chibiluk
Posts: 4
Joined: Fri Sep 28, 2007 9:26 am

Post by chibiluk »

Hello, I've follow your guide to install all cacti. All is installed except optionals. But I've the same problem about the modules, the 'php -m' command return this issue:

Code: Select all

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 (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): 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 (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)

[PHP Modules]
bcmath
calendar
com_dotnet
ctype
date
dom
filter
ftp
hash
iconv
json
libxml
mysql
odbc
pcre
Reflection
session
SimpleXML
snmp
sockets
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib

[Zend Modules]
And there is the issue of the "set m":

Code: Select all

MIBDIRS= C:\PHP\Extras\mibs
I don't know where to looking for now? Could you please help me ?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) verify mib files are in that directory
2) rebooted the server yet?
bhhandley
Posts: 1
Joined: Sun Sep 30, 2007 5:34 am

Post by bhhandley »

Had the same problem. Setting the following environment variable fixed it...

Name: SNMPCONFPATH
Value: <path to snmp.conf>

For me the value is: C:/net-snmp/etc/snmp
chibiluk
Posts: 4
Joined: Fri Sep 28, 2007 9:26 am

Post by chibiluk »

I've already check the mibs path, they are all in the directory and reboot don't change anything. I'm going to install Net-SNMP to try your solution Bhhandley.
chibiluk
Posts: 4
Joined: Fri Sep 28, 2007 9:26 am

Post by chibiluk »

It doesn't work for me :(
chibiluk
Posts: 4
Joined: Fri Sep 28, 2007 9:26 am

Post by chibiluk »

Solved by moving c:/PHP/Extras/mibs under c:/USR/ and adding c:/USR/mibs to the MIBDIRS variable environment.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests