【问题标题】:How to resolve mcrypt error ' Use of undefined constant MCRYPT_RIJNDAEL_128' in php laravel framework?如何解决 php laravel 框架中的 mcrypt 错误“使用未定义的常量 MCRYPT_RIJNDAEL_128”?
【发布时间】:2019-06-05 04:15:04
【问题描述】:

通过在我的 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/

这个错误阻止我正常运行项目。

【问题讨论】:

  • 这与 Swift 编程语言有什么关系?
  • Mcrypt 已弃用

标签: php mcrypt


【解决方案1】:

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

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

如果使用,请重新启动 nginx。

【讨论】:

    猜你喜欢
    • 2015-07-11
    • 2017-01-03
    • 2016-06-23
    • 2022-01-18
    • 2017-04-06
    • 2012-02-22
    • 2018-05-06
    • 2012-10-21
    • 1970-01-01
    相关资源
    最近更新 更多