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
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:
crc32
md5
sha1
haval256
ripemd160
tiger
gost
crc32b
haval224
haval192
haval160
haval128
tiger128
tiger160
md4
sha256
adler32
sha224
sha512
sha384
whirlpool
ripemd128
ripemd256
ripemd320
snefru128
snefru256
md2
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?
Any solution here? Same issue on my end as well.
Enable mcrypt with:
sudo php5enmod mcrypt
Restart apache/php-fpm:
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:
<?php phpinfo();
Execute it, and check if mcrypt is present.