英文:
Error running Laravel 9.51.0 in Docker with PHP 8.2.2
问题
我有以下环境:
- Ubuntu 20.0.4
- Docker 20.10.18, build b40c2f6
我使用以下命令获取了 Laravel:curl -s https://laravel.build/example-app | bash
然后我运行 cd example-app/ && ./vendor/bin/sail up
来运行 example-app,但在浏览器中打开 http://localhost/ 时出现以下错误:
无法以附加模式打开流或文件“/var/www/html/storage/logs/laravel.log”:打开流时发生无效参数错误,异常发生在尝试记录日志时:流或文件
如何修复上面的错误?我的本地开发环境设置有什么问题?
运行命令 vendor/bin/sail up
会生成错误,我不知道如何修复。
英文:
I have a:
- Ubuntu 20.0.4
- Docker 20.10.18, build b40c2f6
I got Laravel using the following command: curl -s https://laravel.build/example-app | bash
Then I run cd example-app/ && ./vendor/bin/sail up
to run the example-app I got the following error opening http://localhost/ in a browser:
> The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Invalid argument The exception occurred while attempting to log: The stream or file
How can I fix the error above? What is wrong with my local dev environment setup?
Running command vendor/bin/sail up
generates the error I don't know how to fix.
答案1
得分: 0
I've runned command: chmod -Rv 777 /var/www/html/storage/logs/
and it has solved this errors. Now Laravel app loading normally.
英文:
I've runned command: chmod -Rv 777 /var/www/html/storage/logs/
and it has solved this errors.
Now Laravel app loading normally.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论