Fatal error: Call to undefined function mysql_connect()

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

Moderators: Developers, Moderators

Post Reply
Tracy
Posts: 8
Joined: Wed Dec 14, 2005 4:43 pm

Fatal error: Call to undefined function mysql_connect()

Post by Tracy »

I follow the installation document exactly, during installation, there is no error. when I run http://localhost/cacti, then I got:
Fatal error: Call to undefined function mysql_connect() in C:\Apache2\htdocs\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 338
who can help me out?
Thanks

cacti-0.8.6g
apache2.2.0
mysql5.0.16
rrdtool1.0.49
php5.1.1
net-snmp5.2.2.1
cactid0.8.6f
Tracy
Posts: 8
Joined: Wed Dec 14, 2005 4:43 pm

Post by Tracy »

Did I miss some path environment variables? I checedk the installation manual for many times. Felt that I didn't miss something. Can't figure it out... :(

Anyway, who know the file location which include mysql_connect function?

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

Post by BSOD2600 »

1) read the guide in my signature.
2) either you didnt uncomment the php_mysql.dl in php.ini or you need to apply the old password method, outlined in my guide (step #6 under MySQL).
Tracy
Posts: 8
Joined: Wed Dec 14, 2005 4:43 pm

Post by Tracy »

Finally I got it work.

Thanks
ua_mk_2005
Posts: 15
Joined: Mon Dec 19, 2005 11:21 am
Location: Columbus, Ohio, U.S.A.

Post by ua_mk_2005 »

What did you do to get it working? Also, where is the "guide in my signature" located that BSOD2006 speaks of? I am having the exact same problem, and my apache logs are listing:

[Mon Dec 19 10:40:17 2005] [error] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 338

I am running on OpenBSD 3.8, chroot apache 1.3.29 (tested both ways), mysql 4.0.24, php 5 with mysql extensions. PHP is working (tested using PHP test script). MySQL also is working, database created, etc...

Specifically, when I try to log into cacti for the first time, I get a blank page and the log message above. That is all. Cacti has not worked on this machine, however, I did have it running for over a year on a FreeBSD box. Any help is greatly appreciated.

Thanks!
ua_mk_2005
Posts: 15
Joined: Mon Dec 19, 2005 11:21 am
Location: Columbus, Ohio, U.S.A.

Post by ua_mk_2005 »

ok, you must have to have a profile and be logged in to see the signature. I found it, and followed the instructions (as closely as possible, due to platform differences), and I am still getting the same thing. I have tried running httpd under the chroot environment and without it and still nothing...
Tracy
Posts: 8
Joined: Wed Dec 14, 2005 4:43 pm

Post by Tracy »

I changed the MySQL to 4.1.16
First of all: uninstall all what I installed
reboot the computer
then follow the installation instruction, For each software, I keep the original version except MySQL which I use 4.1.16

then it works
ua_mk_2005
Posts: 15
Joined: Mon Dec 19, 2005 11:21 am
Location: Columbus, Ohio, U.S.A.

Post by ua_mk_2005 »

Thanks, i will try removing 5.04 and going with 4.x. I'll post back the results.
ua_mk_2005
Posts: 15
Joined: Mon Dec 19, 2005 11:21 am
Location: Columbus, Ohio, U.S.A.

Post by ua_mk_2005 »

Got it! I installed 4.4.1 and then installed the mysql module, then activated it, using /usr/local/sbin/phpxs -a mysql. I didnt do that before, so it may have worked under php 5.x
Tracy
Posts: 8
Joined: Wed Dec 14, 2005 4:43 pm

Post by Tracy »

nice to hear!
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests