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
- php artisan key:generate
- php artisan config:clear
- php artisan clear-compiled
- php artisan config:clear
- adding app key to /config/app.php, deleting the .env file, adding the key to both .env and app.php and still does not work.
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
key
is set to find an env key ofsomestring
and not the app key. So'key' => env('APP_KEY')
– Nicklas Kevin Frank