Your PHP installation appears to be missing the MySQL extension

A website was reported to quit working and that was true. All other websites on the machine (about 50) had no problem. Figured they screwed something up. Restored it to a backup from yesterday, then last week. Same results. Restored to two other machines and received the error: One server was just built a few days ago, the other about a month. New machines with no known problems.

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

Apache error log does not have a lot in it. The only critical error: [Mon Mar 03 22:24:07 2014] [crit] [client 24.18.44.214] (13)Permission denied: /home/prospectorman/public_html/wp-admin/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

Not even an error generated when I was trying to display the website. Very little in the logfiles. My guess is that the error message about the MySQL extension is not the real problem. So what could the real problem be and how to I figure that out? Logfiles is the only thing I can think of at the moment. There is a long string of errors in the /etc/httpd/logs/error_log such as:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mcrypt.so' - /usr/lib/php/modules/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0

This is true for php/modules/mysql.so php/modules/mysqli.so php/modules/odbc.so php/modules/pdo.so and several others. However, all sites on the servers are working except this one.

Status: 
Active

Comments

Howdy -- what is the output of this command:

php -v

Also, if you look in Server Configuration -> Website Options, what is the PHP Execution Mode set to?

PHP 5.3.3 (cli) (built: Dec 11 2013 03:29:57) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

FCGId (run as virtual server owner)

Under either cgi or FCGId the errors in the Apache log seem to be identical.

PHP Warning: PHP Startup: Unable to load dynamic library

PHP 5.3.3 (cli) (built: Dec 11 2013 03:29:57) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

FCGId (run as virtual server owner)

Under either cgi or FCGId the errors in the Apache log seem to be identical.

PHP Warning: PHP Startup: Unable to load dynamic library

If you look in $HOME/etc/php.ini, what is the "include_path" set to?

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"

It is rem'd out. ??

The only conclusion I can make is that the client changes some files and broke there site. I finally tried a restore on one about six weeks old and that worked. However, the client claims it was working a few days ago. I am not going to scratch my head on this one any longer. Thanks all the same as always!

I'm glad you got it working -- I suspect something within the php.ini file had it looking in the wrong place for PHP modules. It may have been related to the include path above, though I was more expecting to see that set, and pointing to a non-existing location.

It sounds like it's a mystery then, but it's good that it's working now!

The client has finally gotten a DNS issue fixed but the website still produces the error. We have restored it from any number of backup files. Still not sure where to look. The Apache error log has references to not finding files in the php.cgi folder but I am uncertain as to how to use this information.

----- script not found or unable to stat: /home/domain/cgi-bin/php.cgi ----

Does this help at all?

If you look in Server Configuration -> Website Options, what is the PHP Execution Mode set to?

FCGId (run as virtual server owner) For the most part we run 5 or 6 pro versions of Webmin with little modifications to the initial setup. CentOS 6.5 and most of the site are probably WordPress sites. Normally just some resource tweaking. We have had good luck with FCGId so far and I don't think any of the servers use CGI, though for testing we have changed individual servers just to see what happens in the log files. It has never fixed a website to change it so far. Since these servers have many WordPress sites, I can only imagine that there is something about this particular website that is different though what that is I have yet to figure it out.

Could you try switching to "CGI", save that, and then switch back to FCGID?

It sounds like it's pointing at a wrapper script that doesn't exist. Switching away from FCGID, and then back to it, will regenerate that wrapper script.

Waiting to see what gets parsed after the CGI experiment. I did not restart Apache. Will that be necessary?

There are some warnings like this one.

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_mysql.so' - /usr/lib/php/modules/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0

This in the system log files but nothing much to look at in the virtual server log files yet.