What is needed for PHP mcrypt_decrypt ()?

I have a script that uses the mcrypt_decrypt () function, but I get the following error

Fatal error: function call undefined mcrypt_decrypt ()

What modules / libraries do you need to enable to use this feature? Or is there another reason I'm getting an error?

thanks

+5
source share
9 answers

Please look:

You need to compile your PHP with --with-mcrypt[=DIR]and have libmcrypt version 2.5.6 or greater on your computer.

+6
source

sudo apt-get install php5-mcrypt

works on ubuntu.

+16
source

php5-mcrypt php5-fpm (Ubuntu 14.04)

, nginx php-fpm.

php5-mcrypt ( php5-fpm). , apt-get install php5-mcrypt

, ln -s/etc/php5/conf.d/mcrypt.ini/etc/php5/mods-available/mcrypt.ini

. php5enmod mcrypt

php-fpm, php5-fpm

nginx, nginx

!

+5

manual:

PHP --with-mcrypt [= DIR], . DIR - mcrypt . libmcrypt --disable-POSIX-.

, PHP , undefined, , .

+2

, :

mcrypt.ini /etc/php 5/conf.d

extension=mcrypt.so
0
0

php 5.3.X

yum mcrypt, yum

:   yum install php53-mcrypt httpd

0

phpinfo: " .ini", : " .ini ".

0
source

After upgrading to php 5.4 (Works)

sudo php5enmod mcrypt
sudo service apache2 restart
0
source

All Articles