Results 1 to 2 of 2
We just set up a new Fedora 12 server. It can't connect from PHP....we're really stumped.
Here's what we did to troubleshoot:
Connected successfully (remote) from Workbench Connected successfully as ...
- 04-26-2010 #1Just Joined!
- Join Date
- Apr 2010
- Posts
- 4
MySQL Can't Connect from PHP (Fedora 12)
We just set up a new Fedora 12 server. It can't connect from PHP....we're really stumped.
Here's what we did to troubleshoot:
- Connected successfully (remote) from Workbench
- Connected successfully as the web site user from CLI
- Checked (and reinstalled) the php-mysql package
- Turned off iptables, no change
- installed mysql-devel packages
We've got a drupal site installed and it does a function that checks if mysql_connect exists. Drupal says the function doesn't exist, so it's like PHP doesn't even see mysql. Now, we didn't uncomment the extension=mysql.so line in php.ini, but I checked my cPanel Cent machine and it wasn't uncommented there either, so I assume it doesn't have to be on Fedora/RHEL/Cent.
We installed from yum, we did NOT compile Apache/PHP/MySQL. We'd prefer not to if possible.
Anyone have any ideas?
UPDATE: We are running on a VPS and we had enabled mpm.worker (ie, we uncommented the worker line in /etc/sysconfig/httpd).
Once we went back to using prefork, all is well. Apparently you have to compile php/apache to use worker.
- 04-27-2010 #2Just Joined!
- Join Date
- Jan 2008
- Posts
- 17
Is php-mysql package installed?
rpm -qa php-mysql


Reply With Quote