Jump to content

Cant access MySQL from PHP script


Recommended Posts

Im having trouble with connecting to mysql server from my php script. When I tried to setup phpMyAdmin it returns an error like this:
[b]"Cannot load mysql extension. Please check your PHP configuration. - Documentation"[/b]

When I tried to connect to mysql database using my own script ($connection = mysql_connect('localhost', 'user', 'pass') it returns an error message like this:
[b]"Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\htdocs\db.php on line 9"[/b]

I copy the libmysql.dll to WINDOWS/system32 directory and php.ini to WINDOWS directory, I also set the extension_dir of php.ini to "c:\php\ext" where is the actual location of extensions in my php installation directory and i Uncomment the extension=php_mysql.dll

I used the following versions:
PHP 5.1.4-Win32
MySQL-essential-5.0.24-Win32
Apache 2.0.59-Win32

I also tried MySQL-essential-4.1.21-Win32 but still it returns an error.

What should I do?
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.