1

I am using php 7.3.2 on window 7. When I try to run php artisan serve, it shows this error on the webpage:

Whoops, looks like something went wrong.

Is it related to the message that I received when I want to migrate database, it says

Application In Production!

My error in laravel log shows

production.ERROR: RuntimeException: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. in C:\xampp\htdocs\Inventory\vendor\laravel\framework\src\Illuminate\Encryption\Encrypter.php:43

3
  • Please post the relating error in your storage/logs/laravel.log file Commented Nov 27, 2019 at 10:08
  • The error shows production.ERROR: RuntimeException: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. in C:\xampp\htdocs\Inventory\vendor\laravel\framework\src\Illuminate\Encryption\Encrypter.php:43 Commented Nov 27, 2019 at 10:11
  • You need to add a secret key. See below answer Commented Nov 27, 2019 at 10:15

2 Answers 2

3

Following the error in your log file you seem to be missing your key attribute in your .env file. See this SO question for a solution.

To generate the secret key, run

$ php artisan key:generate

make sure to follow the official docs when installing Laravel.

Sign up to request clarification or add additional context in comments.

Comments

0

Your laravel is running in production mode. If you are developing local, you should switch that for your local maschine.

To do so: In your .env set the APP_ENV to local (APP_ENV=local) and try again.

Now, you will see the full error message and you are able to handle it now.

5 Comments

my .env.exampe file already put APP_NAME=Laravel, APP_ENV=local, APP_KEY=, APP_DEBUG=true, APP_LOG_LEVEL=debug, APP_URL=http://localhost
@irhamdollah Your key-value is missing. See below answer
@irhamdollah dont look .env.example, change in .env file
You have to look to your .env, not your .env.example for this is just a template
In case, you do not have an .env, copy the .env.example and rename it to .env, then execute on your cli php artisan key:generate and try again

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.