PHP error - Unable to load dynamic library

PHP module not found when I apply

php -v

Error message:

[root@vz1 ~]# php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/dbase.so' - /usr/lib/php/modules/dbase.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/modules/mbstring.so' - /usr/lib/php/modules/mbstring.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/modules/mcrypt.so' - /usr/lib/php/modules/mcrypt.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/modules/mysql.so' - /usr/lib/php/modules/mysql.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/modules/mysqli.so' - /usr/lib/php/modules/mysqli.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/modules/pdo.so' - /usr/lib/php/modules/pdo.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/modules/pdo_mysql.so' - /usr/lib/php/modules/pdo_mysql.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/modules/pdo_sqlite.so' - /usr/lib/php/modules/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0

Solution:

Login as root via ssh

nano /etc/php.ini

Assume this is a 64bit host. Change the module directory to as below:

from /usr/lib/php/modules to /usr/lib64/php/modules

  • 414 Users Found This Useful
Was this answer helpful?

Related Articles

find large file

find / -type f -size +100000000c -ls This will list all file located at "/" that...

Installing DBD::mysql from source

wget http://www.cpan.org/modules/by-module/DBD/DBI-1.56.tar.gz tar xvzf DBI-1.56.tar.gz cd...

Hardening Server included

  LSM (Linux Socket Monitoring) installed and configured - Function is to monitor ANY...

Stop Exim

killall exim or Service exim stop or killall -9 exim

Add user to sudoers list

sudoers list is the user list that allowed to execute specify command in sshTo add 1 user to...

Powered by WHMCompleteSolution