Since Laravel4 requires mcrypt
extension, and PHP7 doesn't seem to have mcrypt
extension, is there any workaround for this to work?
Laravel does not need mcrypt extension anymore. The best (=secure) solution is to update to Laravel >5.1 (there is no LTS before Laravel 5.2).
You can install Mcrypt from the PHP Source Tree as a module if you choose. Enable the module by adding: 'extension=mcrypt.so' to PHP. ini. Done!
What is mcrypt? The mcrypt extension is a replacement for the UNIX crypt command. These commands serve as a means to encrypt files on UNIX and Linux systems. The php-mcrypt extension serves as an interface between PHP and mcrypt.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With