Symptoms
-
Site shows the following error:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress
-
Plesk is installed on Cloudlinux
-
The
mysql
extension is enabled in Plesk > Subscriptions > example.com > PHP Selector > PHP 5.6 -
Checking from SSH shows that
mysql
extension is enabled in PHP selector:# selectorctl --list-extensions --version=5.6 | grep mysql
+ mysql
+ mysqli
- mysqlnd
- nd_mysql
- nd_mysqli
- nd_pdo_mysql
+ pdo_mysql -
Checking directly the CloudLinux PHP 5.6 shows that
mysql
extension is not loaded:# /opt/alt/php56/usr/bin/php-cgi -m | grep mysql
(Empty Output) -
The
mysql
library exists on the server:# ls -la /opt/alt/php56/usr/lib64/php/modules | grep mysql
lrwxrwxrwx 1 root root 36 Jul 5 13:55 mysql.so -> /opt/alt/php56/etc/mysql5.5/mysql.so -
MySQL PHP extension is enabled:
# egrep -Ri mysql /opt/alt/php56/etc/php* | egrep ^extension
/opt/alt/php56/etc/php.d.all/mysql.iniextension=mysql.so - The following article did not help: Unable to install WordPress using WP Toolkit: Call to undefined function json_encode()
Cause
Cloudlinux PHP misconfiguration: Not all the alt-php required packages are installed
Resolution
Contact Cloudlinux Support to get support with PHP shipped by CloudLinux
Additional information
Why does phpinfo page show wrong information in CloudLinux when PHP Selector is used?