Search code examples
phpapachesymfonydemo

Synfony demo: no route found for "GET /_configurator/" & ResourceNotFoundException


I wanted to learn Symfony and decided to get the demo app, they've released.

I have an Ubuntu 14.04 server running apache 2.4.7 that seems to apply for all Symfony requirements.

However on a fresh install of the demo, already on the first step, I'm unable to configure it by going to the web/config.php as the "Configure your Symfony Application online" link throws me an error with 2 exceptions:

Error:

No route found for "GET /_configurator/" (from http://example.com/symfony/symfony_demo/web/config.php")

And 2 exceptions:

404 Not Found - NotFoundHttpException

1 linked Exception: ResourceNotFoundException

In the log I have this:

ERROR - Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /_configurator/" (from "http://example.com/symfony/symfony_demo/web/config.php")" at /var/www/example/public_html/symfony/symfony_demo/app/cache/dev/classes.php line 2056

I've tried googling for the issue and searched on the Stackoverflow, but so far have had no luck figuring out what it could be or what could be wrong. As I'm very new to the Symfony framework and don't yet know how these routes and things work, am hoping someone here can help me.

As I Understood, the config was the place I'm supposed to get everything started including database configuration, I'm completely lost.

Also as a note, I did the installation by first downloading and installing symfony installer:

$ sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony
$ sudo chmod a+x /usr/local/bin/symfony

and then installing the demo as instructed:

$ symfony demo

however as I did it on a remote live virtual server I have, I did not run the php server starting command as the whole thing is temporarily in a domains web directory configured in apache.

Thank you very much for any help!

Alari


Solution

  • Welcome to Symfony.

    The web directory of the installation has three .php files.

    1) app.php: this is for production environment (end user)

    2) app_dev.php this is for development environment (you)

    3) config.php for configuration

    number 2 and 3 are only accessible from the localhost out of the box. But if you open the files in your editor then you will quickly find an array that you can extend with an extra ip number. If you add your own ip-number and replace the files on your remote server then you will be able to access them from that ip.

    The config.php is not really necessary. You could make the app/config/parameters.yml file also manually without config.php. Documentation: http://symfony.com/doc/current/best_practices/configuration.html

    Please use a editor that supports yaml files like netbeans.

    Good luck :-)