Fatal error: Call to undefined function mysql_connect() in C

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

Moderators: Developers, Moderators

Post Reply
John Stephens
Posts: 4
Joined: Thu Aug 04, 2005 9:26 pm

Fatal error: Call to undefined function mysql_connect() in C

Post by John Stephens »

Full Message

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

which is somehow where it got installed

New User
Installed on Windows 2000 Server
Latest Version of Cacti
PHP 5
Apache 2 Monitor says using PHP 5

I get the message when I try to logon the first time to change the Admin Password

Item No 4 when following Installing under windows doc

FAQ says could be because of mysql.so extension commented out but I think this refers to unix mysql.dll not commented

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

Post by BSOD2600 »

Type: php -m and paste the output. You've likely forgot to uncomment the php_mysql.dll from your php.ini
John Stephens
Posts: 4
Joined: Thu Aug 04, 2005 9:26 pm

Post by John Stephens »

Thanks - Yes I did that but heres the php -m to see if you can see anything else

C:\Documents and Settings\john>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)
C:/Net-SNMP/etc/snmp/snmp.conf: line 2: Warning: Unknown token: persistentDir.
C:/Net-SNMP/etc/snmp/snmp.conf: line 3: Warning: Unknown token: tempFilePattern.

[PHP Modules]
bcmath
calendar
com_dotnet
ctype
date
dom
ftp
iconv
libxml
mysql
odbc
pcre
PDO
session
SimpleXML
snmp
sockets
SPL
SQLite
standard
tokenizer
wddx
xml
zlib

[Zend Modules]


C:\Documents and Settings\john>
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) Did you forget to enter all the needed info into config.php? database name, database host, database userid, database password.

2) What mysql version?

3) Take a look at this fix
Phobos182
Cacti User
Posts: 65
Joined: Tue Sep 21, 2004 2:22 pm
Location: Madison, WI

Post by Phobos182 »

Reboot. That fixed it for me.
John Stephens
Posts: 4
Joined: Thu Aug 04, 2005 9:26 pm

Post by John Stephens »

Problem Fixed. Thanks For your help. It turned out to be an extra php.ini in the WINNT directory. Somebody else must have played with an earlier version of PHP before I got to the machine
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests