PHP Warning: PHP Startup: Unable to load dynamic library

Discussion in 'ISPConfig 3 Priority Support' started by spazio, Nov 8, 2021.

  1. spazio

    spazio Member HowtoForge Supporter

    Hi,

    I'm in the process of migrating some old server Ubuntu 16.04.7 LTS with the ispconfig Migration Tool and I'm geeting this error on the source server when starting
    root@oldserver:~/migration# ./migrate
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_mysqli.dll' - /usr/lib/php/20151012/php_mysqli.dll: cannot open shared object file: No such file or directory in Unknown on line 0
    I have the following php version installed
    root@oldserver:~/migration# update-alternatives --config php
    There are 5 choices for the alternative php (providing /usr/bin/php).

    Selection Path Priority Status
    ------------------------------------------------------------
    0 /usr/bin/php7.3 73 auto mode
    1 /usr/bin/hhvm 40 manual mode
    2 /usr/bin/php5.6 56 manual mode
    * 3 /usr/bin/php7.0 70 manual mode
    4 /usr/bin/php7.1 71 manual mode
    5 /usr/bin/php7.3 73 manual mode

    Looks like I have the
    root@oldserver:~/migration# ls -al /etc/php/7.0/cli/conf.d/20-mysqli.ini
    lrwxrwxrwx 1 root root 38 May 12 2016 /etc/php/7.0/cli/conf.d/20-mysqli.ini -> /etc/php/7.0/mods-available/mysqli.ini

    Anyidea on how to solve this?
    Thanks in advance.
     
  2. spazio

    spazio Member HowtoForge Supporter

    Look like it's a library link problem.
    If I change the update-alternatives --config php from
    * 3 /usr/bin/php7.0 70 manual mode
    to
    * 2 /usr/bin/php5.6 56 manual mode
    I don't get the error but it's Missing php-curl module

    looks like there is a mixup in the library php_mysqli.dll of php 7...
     
    Last edited: Nov 8, 2021
  3. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    That is a filename from a windows server, not a ubuntu server (which would be /usr/lib/php/20151012/mysqli.so).
     
  4. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    I think it's a "broken php config" problem. Maybe you/someone followed some instructions that pertained to windows by mistake? I'd search for that php_mysqli.dll filename (eg. grep through /etc/php to start with) and see if you can find where/why it's being loaded, and see if it's obvious how to fix it. FWIW, the correct file (mysqli.so) should come from the php7.0-mysql package.
     
    Last edited: Nov 8, 2021
  5. spazio

    spazio Member HowtoForge Supporter

    Thanks Jesse ,
    It's probably that. Like I said it's an old server that a lod of peoples worked on.

    So after a couples of reasearch on the config files. I found that the cli php.ini was loading this
    extension=php_mysqli.dll

    After commenting and restarting php the error wen away.
    Weird to try to load dll ( windows ) file

    So thanks again.
     

Share This Page