0

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?

2
  • add output "ls /usr/lib64/php/modules/*mcrypt*"
    – ooshro
    Feb 27, 2011 at 5:39
  • what do you mean?
    – EquinoX
    Feb 27, 2011 at 5:45

1 Answer 1

4

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .