简体   繁体   中英

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

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.

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

我通过在.env和Config / App.php中添加Web应用程序的URL来解决此问题,现在它可以正常工作了:)感谢大家共享这样的有价值的知识,可能会对我有所帮助。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM