Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony error 500 with app.php, works fine on app_dev.php

Tags:

php

symfony1

I am currently trying to use our (basic) Symfony 2 app by accessing app.php. However, whenever I try to access app.php, I get an error 500. I have checked the logs, the production log is empty. I have tried the assetic entry in the config file, but to no avail. Anyone else who has any ideas on how to fix this?

This is a very basic application (for now), with just some routing changes and a new controller. The most part is html (as a test), so it can't be the php we've written so far.

--edit: I currently do not have the documentroot pointing to the /web directory, but I don't have admin rights on the server. However, because the app works in app_dev.php, I don't see how this could be a problem?

like image 776
QuintenVK Avatar asked Aug 20 '12 12:08

QuintenVK


3 Answers

The problem also can be caused by changing state of one variable into the web/app.php file from false to true.

Check linie:

$kernel = new AppKernel('prod', false);

and change to:

$kernel = new AppKernel('prod', true);
like image 103
Egel Avatar answered Sep 30 '22 17:09

Egel


I had the same issue, but with setting true:

$kernel = new AppKernel('prod', true); 

I managed to get a readable error message. In my case there was a problem with an mysql-table.

like image 20
Anders Avatar answered Sep 30 '22 19:09

Anders


I fixed it by removing a tab from my .yml config files and contacting the serveradmin to set the directoryroot to /web.

like image 23
QuintenVK Avatar answered Sep 30 '22 19:09

QuintenVK