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

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

This is a very basic application (for now) with some routing changes and a new controller. Most of the html (as a test), so it cannot be the php that we have written so far.

- edit: Currently I do not have a document pointing to the / web directory, but I do not have administrator rights on the server. However, since the application runs in app_dev.php, I don’t see how this could be a problem?

+4
source share
5 answers

I fixed this by removing the tab from my .yml configuration files and contacting serveradmin to set the directory to / web.

+1
source

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

Check linie:

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

and change to:

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

I had the same problem, but with setting true:

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

I was able to get a read error message. In my case, there was a problem with the mysql table.

+2
source

Maybe a little late, but today I have the same error, and that helped clear the cache.

+1
source

Today I ran into this problem, and turning on debug mode through AppKernel still did not display this error. It turned out that I turned on ApcClassLoader in app.php (just before initializing AppKernel ), but APC was not yet included in the new environment in which I deployed. Commenting out the ApcClassLoader bit again in app.php fixes the problem.

0
source

All Articles