Linux : PHP Unable to load dynamic library ‘/usr/lib64/php/modules/

By | February 16, 2014

Having this error on your RHEL/CentOS 6 Web server or issuing “php -v” command?

PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/’ – /usr/lib64/php/modules/ cannot open shared object file: No such file or directory in Unknown on line 0

Then you probably have “php-mcrypt” module installed. Apparently, the “mcrypt.ini” file do not have the proper module name set by default.

Edit the module file :


You will see the following :

; Enable mcrypt extension module

Replace “” for “” as followed :

; Enable mcrypt extension module

Restart Apache :

service httpd restart