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
mysqlextension is enabled in PHP Selector, both over SSH and in Domains > example.com > PHP Selector# selectorctl --list-extensions --version=5.6 | grep mysql
+ mysqlHowever, it is not enabled when checking CloudLinux PHP directly
# /opt/alt/php56/usr/bin/php-cgi -m | grep mysql
(Empty Output)The
mysqllibrary 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.soThe solution from this article doesn't work: Unable to install WordPress using WP Toolkit: Call to undefined function json_encode()
Cause
A misconfiguration in CloudLinux PHP. Not all the packages required by Alt-PHP are installed.
Resolution
Contact CloudLinux Support to get assistance with their PHP versions.