Hassan Raza
Hassan Raza

Reputation: 1546

Whoops, looks like something went wrong. on server

I uploaded all laravel project on server, its working fine on local but getting error on server, even database configuration and key is configured in env. file. even i renamed .env.example file as .env too but got same error.

Error is

"Whoops, looks like something went wrong."

my error log is here:

[2017-11-06 15:19:07] local.ERROR: exception 'RuntimeException' with message 'The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.' in /home/rndspot5/public_html/dev/lea/vendor/laravel/framework/‌​src/Illuminate/Encry‌​ption/Encrypter.php:‌​43

Upvotes: 1

Views: 4678

Answers (3)

Hassan Raza
Hassan Raza

Reputation: 1546

I resolved this issue, by adding web app url in .env and Config/App.php and now its working :) thanks all of you for sharing such a value able knowledge that will help me, may be later.

Upvotes: 0

online Thomas
online Thomas

Reputation: 9401

If you are on shared hosting you can use these steps

  1. Open your .env file, copy APP_KEY to somewhere else as a backup
  2. Run php artisan key:generate from console
  3. Copy the new APP_KEY and upload it to the .env file on your (shared) server
  4. Move the old key back to development

Upvotes: 1

Option
Option

Reputation: 2645

Judging from your error, you need to run php artisan key:generate this will update your key of which in turn will rectify your error.

You will need to either SSH into your public_html folder if you have host permission to do so. Alternatively, you can ask your host provider to either:

  1. Grant you SSH access
  2. Perform this action for you.

You can then run: php artisan config:clear once the new key has been generated.

Upvotes: 1

Related Questions