php5-mysql centos 5.4 wordpress

I am running CentOS v5.3. After I install and update it is now at 5.4.

At this point I am trying to restore my sites from my crashed server.

The sites with wordpress restore fine, but when you go to the site I get

"Your PHP installation appears to be missing the MySQL extension which is required by WordPress."

But when I do an rpm -qa|grep -i php the rpm looks like its there.

I do not know what to do.

JT

Status: 
Closed (fixed)

Comments

Joe's picture
Submitted by Joe on Thu, 10/29/2009 - 23:57 Pro Licensee

There are a few reasons the module might not be loading.

What execution type are you using for PHP? (mod_fcgid, cgi, or mod_php?) This will determine where configuration occurs.

Is there an /etc/php.d/mysql.ini file? This is usually included by the main php.ini, and loads the mysql PHP module.

I do not know what wordpress uses. This wordpress was installed using the "Install Scripts", v2.4.8

Is there an /etc/php.d/mysql.ini file? Yes, here is the contents.

extension=mysql.so

Are you seeing errors in the error_log of that Virtual Server? That would be located in $HOME/logs/error_log.

Nothing in the log, just an error about robot.txt.

Is the extention_dir setting by chance pointing to an invalid directory?

In $HOME/etc/php.ini, make sure extension_dir isn't being set. Also, if it's being set in the php,ini file under /etc/, make sure it's pointing at the correct place.

Yeah, the extension_dir is often set wrong - I've seen it set to /usr/lib64/php when it should be /usr/lib/php or vice-versa, due to a migration from 32 to 64-bit systems.

$HOME/etc/php.ini is being set to extension_dir = "/usr/lib/php/modules"

/etc/php.ini is being set to extension_dir = "/usr/lib64/php/modules"

But this is CentOS v5.3 x86_64, so isn't this correct ?

JT

looks like if $HOME/etc/php.ini is set this way extension_dir = "/usr/lib64/php/modules" , then it works.

When I do the restore of the site from the backup it resets it back to $HOME/etc/php.ini is set this way extension_dir = "/usr/lib/php/modules", which is STRANGE since it was a CentOS v5.3 x86_64 that this backup came from.

And all the sites worked there.

JT

Ok, the incorrect extension_dir seems to be the cause.

I will have Virtualmin correct that path when restoring a domain in the next release, so that this doesn't happen again..

Sweet. You guys are the BEST...