tomazahlin
tomazahlin

Reputation: 2167

Symfony2 always displays blank page in production

The application works in dev and test and a custom environment, but it does not work in production mode. I have tried all solutions I could find online, but couldn't solve the problem. The project is not so small and it stopped worked recently.

-Bundles are loaded fine in AppKernel

-Routing debug display all routes fine in production

-In app.php: $kernel = new AppKernel('prod', true);

-I have cleared cache and warmed it up. If I load without cache, it generated the prod cache fine.

-If I try to access any route, even an non-existing one, I get a blank page, so it looks like the routes are not being checked.

-No logs are written for production environment, also apache does not log anything. (logs work in other environments by monolog.)

I am using Symfony 2.4.5

Someone can help me here?

Upvotes: 3

Views: 3324

Answers (2)

Jovan Perovic
Jovan Perovic

Reputation: 20193

This actually points to a FATAL php error. But, as expected, you production server has display_error = Off.

It is hover weird that apache does not produce any errors in log file :-/ Inspect your web directory - maybe you'll find the php_error file there containing some details?

EDIT:

Just remembered, thanks to the comments mentioning the APC. Similar thing used to happen to me beacause I had APC enabled in app but my dev box did not have APC installed/enabled

Upvotes: 2

MustafaB
MustafaB

Reputation: 232

did you give full permission to app/log and app/cache folders?

sudo chmod -R 777 app/cache app/logs

Upvotes: 6

Related Questions