Plesk

Plesk administrator receives notifications: PHP Warning: PHP Startup: Unable to load dynamic library ‘/opt/plesk/php/5.6/lib64/php/modules/mysqli.so’

Symptoms

Cause

Incorrect configuration for PHP: extensions mentioned in the error messages are directly compiled into the PHP binary. When present in /opt/plesk/php/X.X/etc/php.ini file, they are also loaded even though they are already compiled into the PHP binary.

Resolution

  1. Connect to the server via SSH.

  2. Open the php.ini file in the working folder of PHP version used on the domain:
    /opt/plesk/php/X.X/etc/php.ini, where X.X is the PHP version.
    For example, if the warning mentions /opt/plesk/php/7.4/lib64/php/modules/mysqli.so, the file is /opt/plesk/php/7.4/etc/php.ini.

  3. Comment out (put ; symbol at the beginning of) the lines with extensions mentioned in the error messages like follows:

    ; extension=mysqli.so
    ; extension=mysqlnd.so
    ; extension=json.so
    ; extension=phar.so