繁体   English   中英

如何解决Mcrypt错误'在PHP Laravel框架中使用未定义的常量MCRYPT_RIJNDAEL_128'?

[英]How to resolve mcrypt error ' Use of undefined constant MCRYPT_RIJNDAEL_128' in php laravel framework?

通过在我的phpstorm上运行“ php artisan serve”,我在EncryptionServiceProvider.php第16行中收到此错误“ ErrorException :使用未定义的常量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/

此错误使我无法正常运行该项目。

重新安装mcrypt后,您启用了它吗? 默认情况下未启用它。

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

或重新启动nginx(如果使用的话)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM