1

When I check the PHP version using php -v i got error message like below

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

PHP Warning: PHP Startup: Unable to load dynamic library

'/usr/lib/php/20151012/php_mysql.dll' - /usr/lib/php/20151012/php_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0

PHP 7.0.15-0ubuntu0.16.04.4 (cli)( NTS )

Please help me to fix the above issue.

2
  • 2
    This is very strange as it says is trying to load a DLL but you are on Linux. You need to detail all the steps you did before reaching this error. It seems to me you are trying to copy/paste some example and it does not apply to Ubuntu. Commented Mar 9, 2017 at 5:13
  • Currently i used this as web server. Could i reinstall the php? Commented Mar 9, 2017 at 5:34

2 Answers 2

0

In Ubuntu 14.04, the following should fix it.

cp /usr/lib/php/20151012/pdo_mysql.so /usr/lib/php/20151012/php_pdo_mysql.dll

Sign up to request clarification or add additional context in comments.

Comments

0

On Linux, the message "Unable to load dynamic library" may occur not only when the library is not found, but also when some its dependency is missing. If you have access to the shell, try to execute:

ls -al /usr/lib/php/20151012/php_mysqli.dll

to make sure that this file exists and then:

ldd /usr/lib/php/20151012/php_mysqli.dll

This is probably how you'll see which of the libraries is missing.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.