Since Laravel4 requires mcrypt extension, and PHP7 doesn\'t seem to have mcrypt extension, is there any workaround for this to work?
Even if you enable mcrypt in php.ini, this issue may occur. Try the following steps.
sudo apt-get update
sudo apt-get install mcrypt php7.0-mcrypt
I am working in ubuntu 16.04 and the following commands also helped me.
whereis php -shows the files with this name
php -v -shows the php version
which php -shows current php version that is running on the server
Had the same issue - PHP7 missing mcrypt.
This worked for me. When asked, keep local PHP configuration files.
sudo apt-get update
sudo apt-get install mcrypt php7.0-mcrypt
sudo apt-get upgrade
Restart FPM (or Apache or NGINX etc.) after installation.
I'm on Mac and with laravel valet I've solved with this:
brew install php70-mcrypt
do like this:
wget http://jp2.php.net/distributions/php-7.0.3.tar.gztar zxf php-7.0.3.tar.gzcd php-7.0.3/ext/mcrypt/php7-path/bin/phpize (when error such as configure: error: mcrypt.h not found. Please reinstall libmcrypt run apt-get install libmcrypt-dev)./configure --with-php-config=/php7-path/bin/php-config(sudo) make && make install .this will install the mcrypt.so in php-7.0.3/ext/mcrypt/modules/usr/lib/php/20151012/ what is the shared extensions dir/etc/php/mods-available/ write as extension=mcrypt.sosudo ln -s /etc/php/mods-available/mcrypt.ini 20-mcrypt.ini in /etc/php/7.0/fpm/conf.dsudo ln -s /etc/php/mods-available/mcrypt.ini 20-mcrypt.ini in /etc/php/7.0/cli/conf.dsudo service nginx restartsudo service php7.0-fpm restartphp7 have mcrypt, you can enable it in php.ini and then everything will work fine.
Open terminal with Ctrl + Alt + T and run following commands for PHP7.0 on Ubuntu 16.4
sudo apt-get install mcrypt php7.0-mcrypt sudo service apache2 restart