英文:
laravel app shows white blank page on Artisan cache:clear or config:clear command
问题
我的Laravel应用程序运行得相当顺利,但我注意到邮件配置没有使用ENV中的值,所以我运行了artisan config:clear
。然后,当我重新加载网站时,显示一个空白白色页面。
到目前为止,我已经尝试了以下方法,但仍然没有解决:
- 检查ENV值中是否有空格(没有找到)
- 运行
artisan config:cache
,config:clear
,view:clear
,route:clear
,甚至clear
- 手动删除bootstrap缓存文件夹中的缓存文件
有人在此之前遇到过这个问题吗?
英文:
My laravel app is working quite well but I noticed the mail config is not using the value from ENV so I ran artisan config:clear. Then, when I reload, the website shows a blank white page.
This are what I have tried so far but still not working:
- Check for whitespace in ENV value (found none)
- Run artisan config:cache, config:clear, view:clear, route:clear and even clear
- Delete cache files in bootstrap cache folder manually
Anyone experienced this before?
答案1
得分: 0
感谢您的帮助,我已经解决了这个问题。
- 我的网站托管在共享主机上,我是通过路由运行
artisan
命令。 - 后来,我能够使用SSH访问来运行
artisan
命令,结果返回了一个错误,阻止了命令的运行。 - 错误是,每次我保存并写入env文件时,我的APPNAME之间都有一个换行符。
- 由于当我访问清除路由时
artisan
命令没有运行,因此缓存配置未清除,因此在尝试发送邮件时返回了已经缓存的数据。
英文:
Thanks for the help, I have been able to solve it.
- My website was hosted on a shared hosting and I was running artisan command through route.
- Later I was able to use ssh access to run artisan command and turns out that it returns an error which prevent the command from running.
- The error was that each time I save and write value to env file, there was a break line between my APPNAME.
- Since the artisan command didn't run when I hit the clear route, the cache config does not clear thereby returns the already cached data when trying to send mail.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论