Problem with PHP connecting to MySQL

Forum for you who has PHP installation issues

Moderators: macek, egami, gesf

sephethus
New php-forum User
New php-forum User
Posts: 2
Joined: Thu Mar 17, 2005 4:08 pm

Problem with PHP connecting to MySQL

Postby sephethus » Thu Mar 17, 2005 4:09 pm

Many people have seen this problem, I'm getting an error-

Call to undefined function mysql_connect()

when trying to connect to the MySQL database.

I'm running Apache 2.0 on Windows XP and PHP 5 with MySQL 4, this isn't a server its just a developer/game/whatever box at home.

Yes - The php.ini has "extension = php_mysql.dll" set under extensions.

Yes - The php_mysql.dll and libmysql.dll are both copied to \windows and \windows\system32 and there is a path set to those directories.

No - There is no error loading it.

Yes - I've tried phpinfo() and NO it does not show a mysql section.

Yes - as obvious from the above comment, php does work by itself w/o calls to mysql.

Yes - I've both restarted the apache service and restarted the computer several times now.

Yes- it is configured the EXACT same way at work and functions beautifully.

What is left to do other than rip all my hair out and sacrifice a goat?

sephethus
New php-forum User
New php-forum User
Posts: 2
Joined: Thu Mar 17, 2005 4:08 pm

Postby sephethus » Thu Mar 17, 2005 4:39 pm

Nevermind, the problem was that the php.ini file I uncommented the extension line in was in the php directory not the windows directory, I just changed the one in the windows directory and it works fine now.


Return to “PHP Installation”

Who is online

Users browsing this forum: No registered users and 1 guest

cron