Question: Plesk site on CloudLinux fails to load MySQL PHP extension: Your PHP installation appears to be missing the MySQL extension
Applicable to:Symptoms- A website hosted on Plesk on CloudLinux shows the following error
Your PHP installation appears to be missing the MySQL extension which is required by WordPress
The mysql extension is enabled in PHP Selector, both over SSH and in
Domains > example.com > PHP Selector# selectorctl --list-extensions --version=5.6 | grep mysql
+ mysql
However, it is not enabled when checking CloudLinux PHP directly
# /opt/alt/php56/usr/bin/php-cgi -m | grep mysql
(Empty Output)
- The mysql library exists on the server, and its extension is enabled
# 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
# egrep -Ri mysql /opt/alt/php56/etc/php* | egrep ^extension
/opt/alt/php56/etc/php.d.all/mysql.iniextension=mysql.so
- The solution from this article doesn't work: Unable to install WordPress using WP Toolkit: Call to undefined function json_encode()
CauseA misconfiguration in CloudLinux PHP. Not all the packages required by Alt-PHP are installed.
ResolutionContact CloudLinux Support to get assistance with their PHP versions.