[英]Symfony2 - Attempting to view my site in prod environment results in a blank screen; no errors/warnings in dev
Cross-posted from the official Symfony Google Group because time is an issue: 由官方Symfony Google Group交叉发布,因为时间问题:
I'm in the final push to upload my site to my host. 我正在努力将我的网站上传到我的主机。 Everything runs fine in the dev environment - no errors, no warnings.
在开发环境中一切运行良好 - 没有错误,没有警告。 When I attempt to access it in prod (localhost/web/app.php/), I get a blank screen.
当我尝试在prod(localhost / web / app.php /)中访问它时,我得到一个空白屏幕。 I attempted to clear the cache, to see if that would help, but got the following error:
我试图清除缓存,看看是否有帮助,但得到以下错误:
$ app/console cache:clear --env=prod
[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
The parameter "kernel.trusted_proxies" must be defined.
I can clear the dev cache without issue. 我可以毫无问题地清除开发缓存。
Please help. 请帮忙。
You'll need to add trusted_proxies to your config, even if it is blank. 您需要将trusted_proxies添加到您的配置中,即使它是空白的。
Within: app/config/config.yml
add: 在:
app/config/config.yml
add:
framework:
trusted_proxies: ~
You'll also likely want to delete your cache files ( app/cache/prod
) and then run your console cache clear ( $ app/console cache:clear --env=prod
) 您可能还想删除缓存文件(
app/cache/prod
)然后清除控制台缓存( $ app/console cache:clear --env=prod
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.