- Plesk Onyx for Linux
- Plesk Onyx 17.5 for Linux
- CloudLinux 7.x with LVE Manager and CageFS support is used;
- alt-php is enabled on the affected domain.
- When trying to install WordPress via the tab Domains > example.com > WordPress > Install, one of the following errors is shown:
PHP Fatal error: Uncaught Error: Call to undefined function json_encode() in /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/mustache/mustache/src/Mustache/Engine.php:637
Fatal error: Call to undefined function mysqli_connect() in /usr/local/psa/var/apspackages/c74e7822-0a26-42e8-9ea6-0c57a5edd8a9/cache/scripts/db-util.php on line 53
Error establishing a database connection. This either means that the username and password information in your `wp-config.php` file is incorrect or we can’t contact the database server at `localhost:3306`. This could mean your host’s database server is down.
- There following error appears in Plesk:
PLESK_ERROR:Unable to interact with the newly created WordPress instance. It may have become corrupted.
- There are the following records in
CONFIG_TEXT: DEBUG [util_exec] [1137da7ae7e29729c434a89b417517e6-0] Finished in 0.24553s, Error code: 0, stdout: Your PHP installation appears to be missing the MySQL extension which is required by WordPress., stderr:
This is Plesk bug with ID PPPM-7237, which is planned to be fixed in next product updates.
As a workaround do the following:
Note: if direct SSH access to the server is not possible, contact server administrator for further assistance.
- Connect to the server over SSH
- Edit the
/opt/alt/phpXX/etc/php.d/default.iniand make sure that mbstring, json and mysqli modules are enabled.
Where phpXX is version of PHP set up in for the affected domain under Plesk > Domains > example.com > PHP settings.
extension=mbstring.so <---- Uncomment this line
extension=json.so <---- Uncomment this line
extension=mysqli.so <---- Add a new line