I installed Magento2.0 in my server (http://www.eradataanalytics.com/magento2/) but I get the following error:
There has been an error processing your request
Notice: Use of undefined constant MCRYPT_BLOWFISH - assumed 'MCRYPT_BLOWFISH' in /var/www/html/magento2/
vendor/magento/framework/Encryption/Encryptor.php on line 397
It's very strange because I have installed mcrypt:
php --ri mcrypt
PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0
mcrypt support => enabled
mcrypt_filter support => enabled
Version => 2.5.8
Api No => 20021217
Supported ciphers => cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes
Supported modes => cbc cfb ctr ecb ncfb nofb ofb stream
Directive => Local Value => Master Value
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value
And this is the list of supported alghoritm:
> mcrypt --list-hash
Supported Hash Algorithms:
The undefined variable is located in the include file /usr/include/mutils/mcrypt.h
but Encryptor.php does not see it.
Can someone help me?
Enable mcrypt with:
sudo php5enmod mcrypt
sudo service apache2 restart sudo service php-fpm restart
If it's still not working, I saw the cases where someone has two PHPs on the system, where one is used with apache/php-fpm, and the other one is used through CLI. That could be the reason why you're thinking that mcrypt is enabled in command line.
In order to be sure that mcrypt is enabled, you have to make test.php and put:
Execute it, and check if mcrypt is present.