Articles in this section

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

Plesk for Linux kb: technical ext: wptk ABT: Group B

Applicable to:

  • Plesk for Linux

Symptoms

  • Administrator receives mail notifications with the following content:

    CONFIG_TEXT: Instance "My CMS" (http://example.com/wordpress): PHP Warning: PHP Startup: Unable to load dynamic library '/opt/plesk/php/5.6/lib64/php/modules/mysqli.so' - /opt/plesk/php/5.6/lib64/php/modules/mysqli.so: undefined symbol: mysqlnd_connect in Unknown on line 0
    PHP Warning: Module 'mysqlnd' already loaded in Unknown on line 0
    PHP Warning: Module 'json' already loaded in Unknown on line 0
    PHP Warning: Module 'Phar' already loaded in Unknown on line 0

  • The following warnings received when updating the plugins/themes at WP Toolkit under [Websites &] Domains > example.com > WordPress > Updates:

    CONFIG_TEXT: PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli.so' (tried: /opt/plesk/php/7.4/lib64/php/modules/mysqli.so (/opt/plesk/php/7.4/lib64/php/modules/mysqli.so: undefined symbol: mysqlnd_global_stats), /opt/plesk/php/7.4/lib64/php/modules/mysqli.so.so (/opt/plesk/php/7.4/lib64/php/modules/mysqli.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

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:

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

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.