6
votes

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

1
Have you installed php-pdo_mysql?113408
I have executed two commands, apt-get install php5.6-mysql & sudo phpenmod pdo_mysql then restarted. Still same issueAzhar Bandri
You can confirm it by using phpinfo() or php -i | grep pdo from your terminal113408
It has /20-pdo_mysql.ini file. so it is installed right?Azhar Bandri
I guess so. When you say you restarted, what did you restart exactly ? Depending on your server config you might need to restart apache2/nginx and php-fpm113408

1 Answers

2
votes

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.)