Symfony up and running - how to fix after installation problems

Posted on June 11, 2014, 8:20 am by

Symfony represents a very complex framework structure, perfect when you integrate it with Doctrine ORM and try to build complex projects, but a little bit hard when comes to make it work.

So, after my experience with it I've decided to list below some fixes for some situations you may encounter.

To install Symfony framework you must follow the instructions from here. When I wrote this post, I used Symfony version 2.5.

Assuming, the framework is installed you may face these issues:

The server returned a “404 Not Found”.
Something is broken. Please e-mail us at [email] and let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for the inconvinience.

First of all try to clear the cache, using the following command:

>>>app/console cache:clear --env=dev


>>>app/console cache:clear --env=prod

Then you must check that the environment is dev and not prod into the /app/AppKernel.php file. In dev environment you should point to the /web/app_dev.php file from your vhost, while in the prod environment should point to the /web/app.php file. This is the cause of this problem, so if you fix this setting everything will be ok.

If you decide that you want to use /web/app.php into a dev environment you must remove all the developmenet settings, routes & configs for the Demo bundle (including from /app/AppKernel.php)

Symfony2 console: permission denied during autocompletion

Here the problem has a very simple solution and that is running the following command into the path you have Symfony installed:

>>>chmod +x app/console


Related articles:

Leave a Comment:


Blog Search

Popular Blog Categories


Want to be informed about latest posts? Subscribe to our newsletter