Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony2 - Attempting to view my site in prod environment results in a blank screen; no errors/warnings in dev

Tags:

php

symfony

Cross-posted from the official Symfony Google Group because time is an issue:

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. 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.

like image 640
Major Productions Avatar asked Dec 28 '12 16:12

Major Productions


1 Answers

You'll need to add trusted_proxies to your config, even if it is blank.

Within: 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)

like image 148
MisterPhilip Avatar answered Sep 28 '22 14:09

MisterPhilip