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:
all:
request:
param:
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:
$_SERVER["REQUEST_URI"] = str_replace($_SERVER["SCRIPT_NAME"], "", $_SERVER["REQUEST_URI"]);
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!
Addendum:
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: http://xiehang.com/blog/2009/07/03/symfony-and-godaddy/
[...] I should have got it solve earlier if I search on the web, there is a great article talking about the solution, and my problem got solved just after 1st part of solution mentioned by the blog – adding [...]
Pingback by Flying Bug » Symfony and Godaddy — July 3, 2009 @ 7:04 am
Buy:Retin-A.Arimidex.Synthroid.Mega Hoodia.Zyban.Human Growth Hormone.Valtrex.Lumigan.Prednisolone.Petcam (Metacam) Oral Suspension.Zovirax.Nexium.Accutane.Prevacid.100% Pure Okinawan Coral Calcium.Actos….
Trackback by GENE — July 21, 2010 @ 4:58 am
Buy:Retin-A.Valtrex.Nexium.Lumigan.Prednisolone.Mega Hoodia.Actos.Human Growth Hormone.Accutane.Arimidex.Synthroid.Petcam (Metacam) Oral Suspension.Prevacid.Zovirax.Zyban.100% Pure Okinawan Coral Calcium….
Trackback by HARRY — September 6, 2010 @ 11:23 am