如何在php laravel框架中解决mcrypt错误'使用未定义的常量MCRYPT_RIJNDAEL_128'?

问题描述 投票:0回答:1

通过在我的phpstorm上运行'php artisan serve',我得到这个错误'ErrorExceptionEncryptionServiceProvider.php第16行:使用未定义的常量MCRYPT_RIJNDAEL_128 - 假设'MCRYPT_RIJNDAEL_128''在浏览器上。

我已经尝试重新安装mcrypt但它没有用。我也没有找到任何解决这个问题的方法。

php artisan serve
PHP Notice:  Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /Users/optergy/safetybeat-dashboard-live/dashboard/config/app.php on line 83
Laravel development server started on http://localhost:8000/

此错误阻止我正确运行项目。

php mcrypt
1个回答
0
投票

重新安装mcrypt后你启用了吗?它默认不启用。

sudo apt-get install php5-mcrypt
sudo php5enmod mcrypt
sudo service apache2 restart

或者如果使用它,重新启动nginx。

© www.soinside.com 2019 - 2024. All rights reserved.