5

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?

4
  • Are the cache and log directories writable, and with the right permissions? Commented Aug 20, 2012 at 12:47
  • I've emptied the cache dir and folders were created. Also, the dev log was edited, so yes, I believe they are writable. Commented Aug 20, 2012 at 12:49
  • You may need to log at warning level in log file. Commented Aug 20, 2012 at 14:06
  • Nope, still nothing :/ (i have edited the action_level FYI) Commented Aug 20, 2012 at 14:39

5 Answers 5

19

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);
Sign up to request clarification or add additional context in comments.

1 Comment

And perhaps it's nice to mention that the kernel constructor typically looks like: AppKernel($environment, $debug). You are thus turning on debugging mode.
2

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.

Comments

1

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

1 Comment

For me the issue was I had bad permissions on folders. You can find here how to setup permissions properly.
1

It might be a little late, but i got same error today, and what helped was clearing cache.

Comments

1

I ran into this issue today, and enabling debug mode through AppKernel still didn't show the error. Turned out I had enabled ApcClassLoader in app.php (just before AppKernel is initialized) but APC wasn't yet enabled on the new environment I deployed to. Commenting the APCClassLoader bit out again in app.php resolved the issue.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.