简体   繁体   English

使用 Laravel Vapor 部署 web 应用程序时,file_put_contents() 出错

[英]Error with file_put_contents() when deploying web app using Laravel Vapor

I just updated my Laravel application to 6.0 to use the new tool Vapor.我刚刚将我的 Laravel 应用程序更新到 6.0 以使用新工具 Vapor。 However, after the deployment process end, I get this error when i access the app using the vanity url:但是,在部署过程结束后,当我使用虚荣 url 访问应用程序时出现此错误:

ErrorException thrown with message 
"file_put_contents(/tmp/storage/framework/sessions/cqDlEgxQSwsYKnBGpPjv94Dvzasa0ECmqF1Rl9xV): 
failed to open stream: No such file or directory"

Do you have some ideas about the reason of this error?你对这个错误的原因有什么想法吗? Thank you谢谢

The best way to solve this problem is, go to directory laravel/bootstrap/cache and delete config.php file.解决这个问题的最好方法是,go 到目录laravel/bootstrap/cache删除config.php文件。

Use this command to clear cache make permission to write cache使用此命令清除cache使写入cache的权限

php artisan config:cache
chmod -R 777 storage/
composer dump-autoload

I faced the same issue while deploying a Laravel app using Vapor.我在使用 Vapor 部署 Laravel 应用程序时遇到了同样的问题。

And solved it by并通过

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=dynamodb
SESSION_LIFETIME=9999
QUEUE_DRIVER=sync

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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