laravel No supported encrypter found. The cipher and / or key length are invalid

前端 未结 14 653
后悔当初
后悔当初 2020-11-29 19:58

I am building a project using Laravel. It was working fine on localhost, but when I upload it to the server (the server has comodo ssl installed), I receive the following er

14条回答
  •  心在旅途
    2020-11-29 20:56

    In my case, I need to enable mcrypt extension.

    But first, check if you already have it:

    $ sudo apt-get install -y mcrypt php5-mcrypt
    

    Check if mcrypt module is loaded:

    $ php -m | grep mcrypt
    

    if nothing shows, is because is not loaded, but you already have installed above right? So do this:

    $ php5enmod mcrypt
    $ sudo service apache2 restart
    

    Check again and you should see mcrypt instead of nothing. Thats a good sign, reload you app and go fix your next error ;)

    $ php -m | grep mcrypt
    mcrypt
    

提交回复
热议问题