mysql_connect() error

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

Moderators: Developers, Moderators

Post Reply
balda
Posts: 7
Joined: Wed Apr 06, 2005 9:12 am

mysql_connect() error

Post by balda »

HELP!

I am getting the following error when trying to launch cacti ...

Windows 2000 -
PHP 5.0.4
APACHE 2.0.53
SQL 4.1.10a

I extensions for php_mysql.dll are setup correctly in php.ini aswell ...

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

When i stop sql server i have the same error.

Thank you for help
BelgianViking
Cacti User
Posts: 97
Joined: Thu Mar 24, 2005 4:59 am
Location: Brussels, Belgium

Post by BelgianViking »

Reboor the whole machine. That worked for me, and a bunch of others.
balda
Posts: 7
Joined: Wed Apr 06, 2005 9:12 am

Post by balda »

yes i reboot already. I have the same error message
thanks
balda
Posts: 7
Joined: Wed Apr 06, 2005 9:12 am

Post by balda »

yes i reboot already. I have the same error message
thanks
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

You sure you entered in the mysql username and password into the config file? Is the mysql service running?
jmjones
Posts: 18
Joined: Wed Feb 09, 2005 12:19 pm

php extensions directory not set correctly

Post by jmjones »

Verify that you only have the one php.ini file. Some installers will try to put one in the system folder (C:\windows), and the executable will use this ini rather than the one in your php folder (C:\php\php.ini is mine)

If you only have the one ini then try to run cmd.php inside of a command shell. Start -> Run. CMD +enter.

If the extensions directory in your php.ini is not set correctly, you will see an alert error. It will tell you that the MySQL dll could not be found. Change the directory to an absolute path and it should fix the issue.

The reason you use the command shell is that when a person accesses the webpage it uses the Iusr account and sends the errors to that desktop (which will never be seen). When you use the command shell, the machine processes the exe as the logged in user - allowing you to see the error message.

Make sure that all of your extension directory and include directories are correct, and all should work.
balda
Posts: 7
Joined: Wed Apr 06, 2005 9:12 am

Post by balda »

I put php.ini in apache directory . it's work fine !
If i put PHPRC=c:\php, it don't know where is my php.ini
djektro
Posts: 16
Joined: Wed Apr 13, 2005 8:31 am

Post by djektro »

can you explain exactly what did you do ??
Because i've the same problem ://
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests