PHP Startup Unable to load dynamic library /usr/li

2019-06-20 09:59发布

I have ubuntu 14.04 EC2 instance. I have installed php 7 on it. when I execute any php command like php --version or any other. I get following error

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 tried following

  1. enable php_mysqli.dll in php.ini
  2. enable mysqli.so
  3. enable php_mysqli.so
  4. sudo apt-get install php-mysql

but nothing worked for me.

Any suggestion how I can solve this?

7条回答
等我变得足够好
2楼-- · 2019-06-20 10:39

If you see mcrypt.so under /etc/php/7.2 or /etc/php/7.3 just delete it and restart the server it will resolve the issue. As when we updrage the php to latest version that file may get stored to latest versions which is not required.

I used following commands:

cd /etc/php/7.3

sudo rm -rf mcrypt.so

sudo service apache2 restart

查看更多
登录 后发表回答