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
Please look:
You need to compile your PHP with --with-mcrypt[=DIR]and have libmcrypt version 2.5.6 or greater on your computer.
--with-mcrypt[=DIR]
sudo apt-get install php5-mcrypt
works on ubuntu.
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
!
manual:
PHP --with-mcrypt [= DIR], . DIR - mcrypt . libmcrypt --disable-POSIX-.
, PHP , undefined, , .
, :
mcrypt.ini /etc/php 5/conf.d
extension=mcrypt.so
PHP 5.4 http://php-osx.liip.ch/, .
php 5.3.X
yum mcrypt, yum
: yum install php53-mcrypt httpd
phpinfo: " .ini", : " .ini ".
After upgrading to php 5.4 (Works)
sudo php5enmod mcrypt sudo service apache2 restart