6

I already refered the link, PHP5 similar issue

and tried all relevant solutions but I'm still getting following issues. Any help is appreciated. Thanks !

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/msql.so' - /usr/lib/php/20131226/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/php_pdo_mysql.dll' - /usr/lib/php/20131226/php_pdo_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0 PHP 5.6.38-3+ubuntu14.04.1+deb.sury.org+1 (cli) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

glitch
  • 48
  • 6
Azhar Bandri
  • 892
  • 1
  • 14
  • 27

1 Answers1

2

your php .ini configuration file(s) makes references to several files that does not exist, for instance /usr/lib/php/20131226/php_pdo_mysql.dll, your php installation has been corrupted. it's probably easier to just re-install PHP, but if you want to repair it manually, make a page called phpinfo.php and have it contain

<?php phpinfo(~0);

and open it in a browser, you will get the location of php.ini and a list of additional ini configuration files parsed, and once you have that, scan the php.ini file, and all additional configuration files, and remove all references to the files that does not exist. for example in this screenshot:

enter image description here

here you'd have to scan the files /etc/php/7.0/fpm/php.ini and /etc/php/7.0/fpm/conf.d/10-mysqlnd.ini and /etc/php/7.0/fpm/conf.d/10-opcache.ini and /etc/php/7.0/fpm/conf.d/10-pdo.ini and /etc/php/7.0/fpm/conf.d/15-xml.ini and /etc/php/7.0/fpm/conf.d/20-calendar.ini and /etc/php/7.0/fpm/conf.d/20-ctype.ini and /etc/php/7.0/fpm/conf.d/20-curl.ini and /etc/php/7.0/fpm/conf.d/20-dom.ini and /etc/php/7.0/fpm/conf.d/20-exif.ini and /etc/php/7.0/fpm/conf.d/20-fileinfo.ini and /etc/php/7.0/fpm/conf.d/20-ftp.ini and /etc/php/7.0/fpm/conf.d/20-gd.ini and /etc/php/7.0/fpm/conf.d/20-gettext.ini and /etc/php/7.0/fpm/conf.d/20-iconv.ini and /etc/php/7.0/fpm/conf.d/20-json.ini and /etc/php/7.0/fpm/conf.d/20-mbstring.ini and /etc/php/7.0/fpm/conf.d/20-mysqli.ini and /etc/php/7.0/fpm/conf.d/20-pdo_mysql.ini and /etc/php/7.0/fpm/conf.d/20-pdo_sqlite.ini and /etc/php/7.0/fpm/conf.d/20-phar.ini and /etc/php/7.0/fpm/conf.d/20-posix.ini and /etc/php/7.0/fpm/conf.d/20-readline.ini and /etc/php/7.0/fpm/conf.d/20-shmop.ini and /etc/php/7.0/fpm/conf.d/20-simplexml.ini and /etc/php/7.0/fpm/conf.d/20-sockets.ini and /etc/php/7.0/fpm/conf.d/20-sqlite3.ini and /etc/php/7.0/fpm/conf.d/20-ssh2.ini and /etc/php/7.0/fpm/conf.d/20-sysvmsg.ini and /etc/php/7.0/fpm/conf.d/20-sysvsem.ini and /etc/php/7.0/fpm/conf.d/20-sysvshm.ini and /etc/php/7.0/fpm/conf.d/20-tokenizer.ini and /etc/php/7.0/fpm/conf.d/20-wddx.ini and /etc/php/7.0/fpm/conf.d/20-xdebug.ini and /etc/php/7.0/fpm/conf.d/20-xmlreader.ini and /etc/php/7.0/fpm/conf.d/20-xmlwriter.ini and /etc/php/7.0/fpm/conf.d/20-xsl.ini for references to the files that does not exist, and remove those references... have fun

(but seriously, you'd probably be better off just re-installing the requred version of PHP. by your comments, i see you already have multiple versions of PHP installed.)

hanshenrik
  • 19,904
  • 4
  • 43
  • 89
  • I got some missing libraries in the past but that didn’t prevent my app from working ? – 113408 Feb 16 '19 at 15:12
  • `phpinfo(~0);` vs `phpinfo();` ? – abdul rashid Jan 29 '20 at 13:48
  • @113408 well some libs you can live without, but many php codebases would stop working when `php_pdo_mysql.dll` cannot be loaded, it would probably make `new PDO()` stop working, at least if you're trying to connect to a MySQL or MariaDB database – hanshenrik Jan 31 '20 at 08:53
  • 1
    @abdulrashid probably very little, the argument for phpinfo() is a bunch of bit-flags to decide what info to show, and `~0` enables every possible flag. (on x86-cpus, doing `-1` also enables every possible flag, but idk if that's portable to other cpus), but it's probably not needed since the default argument (now at least?) is `INFO_ALL` which is also supposed to print all possible info – hanshenrik Jan 31 '20 at 08:56