View Full Version : PHP can't communicate w/ MySQL

5th June 2006, 09:07 PM
I'm trying to get a program that i am running on my webserver to work but i'm coming up with an error that says:

PHP has not been properly configured with the MySQL extension so that it can communicate with MySQL. Please check your php.ini file or recompile PHP.

I saw where someone suggested that you yum php-mysql and I did that but all i did was come up with a bunch of errors. I'm a newbie at this so details are appreciated! Thanks in advance!

6th June 2006, 02:51 AM
Can you post the contents of the errors so we can help figure out what's wrong?

6th June 2006, 02:55 AM
Try this:

yum update
yum install php mysql mysql-server php-mysql
Now it should work :)

6th June 2006, 03:31 AM
I just tried the thing that Firewing1 told me to do and all i got was a bunch of parser errors and finally an error about importing repond.xml from updates-released.

In my first post I wrote what the error said. The program i'm trying to work on is Moodle and that's what came up on the instalation php page.

Also I tried installing phpMyAdmin to maybe fix the problem and when it said to go to my webpage with the proper extension all I got was this error:

phpMyAdmin - Error
Cannot load mysql extension. Please check your PHP configuration. -Documentaion

I checked out the documentation but it didn't help me. Thanks for helping me!

6th June 2006, 06:10 AM
Did you run yum as root?

Also, try doing a "yum clean all".

6th June 2006, 02:54 PM
I think it might be working now. I ran yum update again and then the other stuff and i think it's acting right now. Thanks for all your help

21st July 2006, 04:31 AM
thanks for your solution "Firewing1",

I am using fedora core 4 and I encountered the above mentioned error msg and it worked great after a reboot.