Problems Hosting Symfony 1.2 (!) sites on Godaddy?

March 17, 2009 – 9:58 am

If you’re trying to deploy a Symfony 1.2 site on Godaddy, you may run into some issues that are not remedied by my previous post (which was limited to Symfony 1.0).

The main error you might get looks something like:
Empty module and/or action after parsing the URL “/frontend_dev.php” (/).

To remedy this, you need to edit the factories.yml and add a parameter to the request params, like so:

      path_info_key: REQUEST_URI

(Do not confuse this with the “routing” settings that are already in the file. The “request” settings are commented out in the bottom, so you may not see them right away, and the code above just changing the default path_info_key from PATH_INFO to REQUEST_URI. Just add it below the “routing” settings, on the same indentation level.)

After this is done things may still not work. What I found is that Godaddy adds the script filename to the beginning of the $_SERVER["REQUEST_URI"] variable. This is different from most other hosts I’ve encountered, and it confuses symfony. And me.

So here’s a hack around that. In the /config/ProjectConfiguration.class.php add the following command to the top of the file:


All this does is remove the script name from the REQUEST_URI before symfony bootstraps. Simple but effective.

That should do the trick,
happy shared hosting!

Hang from Flying Bug blog just posted some other interesting godaddy tweaks and corrected an indentation error in my original post. Much appreciated - go check out his blog as well:

Filed under: Symfony — Tags: , — by Richtermeister

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress