Error when running command in RUN BOX

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

Moderators: Developers, Moderators

Post Reply
dhd81
Posts: 29
Joined: Mon Oct 24, 2005 8:32 pm

Error when running command in RUN BOX

Post by dhd81 »

Hi all,

I tried everything but when I run C:\php\php.exe C:\Apache2\htdocs\cacti\poller.php in RUN box, i get below error msg.


Fatal error: Call to undefined function mysql_connect() in C:\Apache2\htdocs\cac
ti\lib\adodb\drivers\adodb-mysql.inc.php on line 338

Please suggest what should I do.

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

Post by BSOD2600 »

1) at the command prompt, type: php -m and paste the output. You're likely missing mysql support.
2) what versions of stuff are you running? You possibly need to apply the mysql old password trick
dhd81
Posts: 29
Joined: Mon Oct 24, 2005 8:32 pm

Post by dhd81 »

Hi BSOD2600,

I am using php-5.0.5-Win32
Apache apache_2.0.55-win32-x86-no_ssl
cacti-0.8.6g
net-snmp-5.2.2.pre1-1.win32
cacti-cactid-0.8.6f-1
mysql-5.0.15-win32

Please check the requested output below and assist me.


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
dom
ftp
iconv
libxml
mysql
odbc
pcre
session
SimpleXML
snmp
sockets
SPL
SQLite
standard
tokenizer
wddx
xml
zlib

[Zend Modules]




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

Post by BSOD2600 »

1) you didnt point your mibsdir variable to the true location where the mib files live for php.

2) MySQL 5.x is not supported with cacti yet. Try 4.1

3) Install the patches for cacti
dhd81
Posts: 29
Joined: Mon Oct 24, 2005 8:32 pm

Post by dhd81 »

do u have msn id? if u r online in msn pls add me my id is dhd81@hotmail.com so we can communicate

thanks
dhd81
Posts: 29
Joined: Mon Oct 24, 2005 8:32 pm

Post by dhd81 »

ok I have changed mysql from 5 to 4.1 I still face the same problem.
I have also checked the location of mib and it is c:\php\extras\mibs

pls tell me what should i do. tell ne this mib varibale have to be set in system or user variable?

thanks
dhd
dhd81
Posts: 29
Joined: Mon Oct 24, 2005 8:32 pm

Post by dhd81 »

I have shifted that mib location from c:\php\extras\mibs to c:\php\mibs and also edited the location of mibdirs. I pointer it to c:\php\mibs

now when i run php -m i get below output

C:\>php -m
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
dom
ftp
iconv
libxml
mysql
odbc
pcre
session
SimpleXML
snmp
sockets
SPL
SQLite
standard
tokenizer
wddx
xml
zlib

[Zend Modules]


Please assist.

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

Post by BSOD2600 »

Thats fine. Now what happens when you run: php <cactipath>poller.php in your cacti directory ?
dhd81
Posts: 29
Joined: Mon Oct 24, 2005 8:32 pm

Post by dhd81 »

thanks guys my cacti is working now i just have to learn how to use it.

thanks for your support
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests