I have followed every direction but I cannot get Laravel 5.2 to work on php 7 on Windows 10. On the same server I have Laravel 4.2 (this is the app I want to upgrade) working with no issues whatsoever. None of the answers on similar questions seem to work.
The error I get is:
No supported encrypter found. The cipher and / or key length are invalid.
If I chage the cipher method to MCRYPT_RIJNDAEL_128 the error becomes:
mcrypt_encrypt(): Key of size 0 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported
I have tried
Currently, my .env file looks like this.
and my app.php file looks like this.
How do I solve this problem? Currently only the home page is working. The login and register pages fail with the errors specified above.
Laravel was installed like this: create-project --prefer-dist laravel/laravel appdir
Don't worry this is a common problem that is easy to miss.
In your app.php
file you are trying to find an env key of somestring
(in this case the actual value you want to return) and not the key in which you set the value in the env file.
Setting the key
in your app.php
file as the following:
'key' => env('APP_KEY')
Should correctly look for the APP_KEY
in your env file and set the corresponding value!
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