How To Fix PHP Warning
How to Fix "PHP Warning: PHP Startup: Unable to load dynamic library"
borhax @ linux ~ $ php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pdo_mysql.so' - /usr/lib/php/20151012/pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0
PHP 7.0.30-0ubuntu0.16.04.1 (cli) (NTS)
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.30-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies
Above one form of the error, when I want to run php suddenly I get the error as above. I confused, before I've installed wordpress on localhost with php, is it because I did it? finally I find the answer in some linux forums, and finally I get the answer, there is one member tell me, I translate to English "I do not know for sure why it happened, but I can help you, run this command ($ sudo apt -get purge --remove php7.0-common)
when he talk like that I think again, because I know if I run the command will remove the package as well as the configuration file from php7.0. a few minutes later I don't want to think long again, I run the command to remove the php package along with their configuration file (below).
$ sudo apt-get purge --remove php7.0-commonafter the uninstall process php package along with the configuration file is complete, next is to re-install php7.0-common package, and php7.0 package (optional, if you still got error after install php7.0-common, you should do this)
$ sudo apt-get install php7.0 php7.0-common -yAfter finished the installation process, you immediately check whether still error or not with this command.
$ php -vthen the output will appear like this.
borhax @ linux ~ $ php -vOf course there is a difference with the previous output, if previously there is log "WARNING" now, do you think? does this work? if in my own opinion it has been successful or can be called fixed, but must set up again my localhost wordpress, but this is not the problem I am still grateful finally my php package is not warning anymore. Okay maybe that's all I can say, hopefully useful though a little science remains science, Bye guys.
PHP 7.0.30-0ubuntu0.16.04.1 (cli) (NTS)
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.30-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies
