Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am getting this error when I run php -v:

PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_mcrypt.dll' - /usr/lib64/php/modules/php_mcrypt.dll: cannot open shared object file: No such file or directory in Unknown on line 0

How can I fix this?

share|improve this question
    
add output "ls /usr/lib64/php/modules/*mcrypt*" –  ooshro Feb 27 '11 at 5:39
    
what do you mean? –  EquinoX Feb 27 '11 at 5:45

1 Answer 1

up vote 4 down vote accepted

Verify whether mcrypt.so exists:

file /usr/lib64/php/modules/mcrypt.so

Then change the php.ini line:

extension=php_mcrypt.dll

to:

extension=mcrypt.so

If it does not exist, install libmcrypt and php-mcrypt:

 wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz
 rpmbuild -ta libmcrypt-2.5.7.tar.gz
 rpm -ivh /usr/src/redhat/RPMS/i386/libmcrypt-2.5.7-1.i386.rpm /usr/src/redhat/RPMS/i386/libmcrypt-devel-2.5.7-1.i386.rpm
 yum --enablerepo=centosplus install php-mcrypt

I recommending using Ubuntu for easy installation of PHP, the PHP modules, and a web server. The Ubuntu repository includes FAR more packages and you do not need to connect other repositories and compile applications.

share|improve this answer
    
mcrypt.so exists and I already add that line in php.ini before, still the error exists –  EquinoX Feb 27 '11 at 5:48
    
delete "extension=php_mcrypt.dll" line from php.ini –  ooshro Feb 27 '11 at 5:50
    
ok, now it gives me a warning: PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0 –  EquinoX Feb 27 '11 at 5:53
    
delete duplication "extension=mcrypt.so" line –  ooshro Feb 27 '11 at 6:04
    
there is only one –  EquinoX Feb 27 '11 at 6:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.