[英]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. 我将所有laravel项目上载到服务器上,它在本地上工作正常,但在服务器上出错,甚至在env中配置了数据库配置和密钥。 file. 文件。 even i renamed .env.example file as .env too but got same error. 甚至我也将.env.example文件也重命名为.env,但出现相同的错误。
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.' [2017-11-06 15:19:07] local.ERROR:带有消息“唯一受支持的密码是具有正确密钥长度的AES-128-CBC和AES-256-CBC的异常” RuntimeException”。 in /home/rndspot5/public_html/dev/lea/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php:43 在/home/rndspot5/public_html/dev/lea/vendor/laravel/framework/src/Illuminate/Encryption/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. 从您的错误判断,您需要运行php artisan key:generate
这将更新您的密钥,而该密钥反过来将纠正您的错误。
You will need to either SSH into your public_html folder if you have host permission to do so. 如果您具有主机许可,则需要使用SSH进入您的public_html文件夹。 Alternatively, you can ask your host provider to either: 或者,您可以要求您的托管服务提供商之一:
You can then run: php artisan config:clear
once the new key has been generated. 然后,您可以运行:一旦生成新密钥, php artisan config:clear
即可。
If you are on shared hosting you can use these steps 如果您在共享主机上,则可以使用以下步骤
APP_KEY
to somewhere else as a backup 打开您的.env文件,将APP_KEY
复制到其他地方作为备份 php artisan key:generate
from console 运行php artisan key:generate
从控制台php artisan key:generate
APP_KEY
and upload it to the .env file on your (shared) server 复制新的APP_KEY
并将其上传到您(共享)服务器上的.env文件 我通过在.env和Config / App.php中添加Web应用程序的URL来解决此问题,现在它可以正常工作了:)感谢大家共享这样的有价值的知识,可能会对我有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.