Deploying a Symfony Project on GoDaddy Shared Hosting
Posted by gfaraj on April 25, 2008
Recently, I had the task of deploying my Symfony project on my GoDaddy shared Linux hosting. I ran into some problems, and I thought I would share in hope of helping any other poor soul who might run into the same problems.
First of all, you should follow the steps here. It does not require you to freeze the project to deploy it. I find that useful for projects that are not yet stable and need to deploy a “beta” version. Also, make sure you have PHP 5 as the default in your GoDaddy Hosting settings.
Next, you need to modify the .htaccess file. Go ahead and uncomment the RewriteBase line in the default symfony .htaccess file:
# uncomment the following line, if you are having trouble # getting no_script_name to work RewriteBase /
This should prevent ‘www.myhost.com/mymodule’ from getting a 404 error from GoDaddy. Now, at least you might get forwarded to your 404 module/action. This is, at least, some proof that you’re moving forward. If you turn on logging (logging is turned off for production configurations by default), you might see the following:
1 Info Context initialization 2 Info Controller initialization 3 Info Routing match route [default_index] "/:module" 4 Info Request request parameters array ( 'module' => 'index.php', 'action' => 'index',) 5 Info Controller dispatch request 6 Info Controller action "indexphp/index" does not exist
As you can see, the module/action resolution is very wrong. This, of course, results in Symfony forwarding to your 404 module/action. Well, it turns out that adding one line to your php5.ini fixes this.
cgi.fix_pathinfo = 1
This worked nicely for me, and I hope it works for you. I’m posting my full php5.ini and .htaccess files for completeness.
Addendum
It has come to my attention that some people are still having problems after making the changes described here. You might want to try one more change. In your application’s config/settings.yml file, set the following setting:
prod: .settings: path_info_key: REDIRECT_URL
php5.ini
register_globals = off allow_url_fopen = off expose_php = Off max_input_time = 60 variables_order = "EGPCS" extension_dir = ./ upload_tmp_dir = /tmp precision = 12 SMTP = relay-hosting.secureserver.net url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" memory_limit = 20000000 session.gc_maxlifetime = 72000 #log_errors = On #error_log = php_error.log #display_errors = On #error_reporting = E_ALL magic_quotes_gpc = false cgi.fix_pathinfo = 1 [Zend] zend_extension=/usr/local/zo/ZendExtensionManager.so zend_extension=/usr/local/zo/4_3/ZendOptimizer.so
.htaccess
Options +FollowSymLinks +ExecCGI RewriteEngine On # uncomment the following line, if you are having trouble # getting no_script_name to work RewriteBase / # we skip all files with .something RewriteCond %{REQUEST_URI} \..+$ RewriteCond %{REQUEST_URI} !\.html$ RewriteRule .* - [L] # we check if the .html version is here (caching) RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f # no, so we redirect to our front web controller RewriteRule ^(.*)$ index.php [QSA,L] # big crash from our front web controller ErrorDocument 500 "<h2>Application error</h2>symfony application failed to start properly"
Michal Thomka said
Thank you very much for this helpful post!
Spent couple of hours trying to figure this out, it was already giving me quite a headache 😉
All the best
Michal
gfaraj said
Glad it helped you 🙂
Zvi Landsman said
My top level directory on GoDaddy is my public html directory – this poses a security risk if all of my files are public.
Is there a way to configure this on GoDaddy (economy plan), or set up .htaccess to prevent these files from being accessed?
gfaraj said
Unfortunately, GoDaddy has that retarded flaw. I have no idea if they have an option to change it. You could probably write a .htaccess rewrite rule to protect the files from being accessed though.
bob said
3r0rjZ hi nice site thanx http://peace.com
Alexwebmaster said
Hello webmaster
I would like to share with you a link to your site
write me here preonrelt@mail.ru
Franck said
Thank you !
Important: in sf1.2 “path_info_key: REDIRECT_URL” is in the factories.yml file not in the settings.yml
XRumerMonstroZ said
Hi!
Gimme url for downloading XRumer 5.0 Palladium crack!
Thank you…
Very-very much.
I’m so need this program for advertise my web projects!!! This software is the best thing for online promo and mass posting, you know…
And, dont send me XRumer 2.9 and XRumer 3.0 – that versions are too old!
P.S. Google cant help me((((
sapumal said
Thank you very much. I had the exact problem and this method worked for me.
Jen said
The Symfony site mentions how shared hosting can be “unsafe”… is GoDaddy affected by the things they mention or can I use Symfony and not worry? I have GoDaddy shared as well and I’m able to navigate all over the place in SSH. I can see other user’s account names (but not their files)… I don’t really know enough about security to know if that means I’m vulnerable. Any help would be appreciated. 🙂
Dreceinge said
hmm. attractive )
car accident lawyer jacksonville said
i must say, your blog is very good, i will be checking back to read more
taunlinuere said
I really enjoyed reading your article, keep up posting such interesting stuff!
Sylvester Hartnett said
Fairly good post, genuinely enlightening information. Never thought I’d discover the information I want right here. I’ve been scouring throughout the internet for some time now and was starting to get disappointed. Thankfully, I stumbled across your blog and acquired precisely what I had been browsing for.
Apul said
Where to put php.ini in godaddy server. I have set,
/home/myname/public_html/article/web to my document root of domain http://www.mydomain.com
Please suggest.
Also, I am getting this error, after all the steps:
Fatal error: Class ‘BaseFormPropel’ not found in /home/myname/public_html/article/lib/form/base/BaseArticleForm.class.php on line 12
But, When I checked that using FTP, file was there.
Please suggest.
Sandeep Raul said
Today i spent entire day fixing this issue: either the index page was shown for any directory or page not found error. Tried all possible stuff but nothing was working out. Luckily got this URL on Google and solved my problem.
Thanks a ton!
🙂
Momo said
Thanks! This helped a lot, and in the spirit of having this documented, I’d like to add that firstly, I had to make a php5.ini file since the default one was php.ini. If you are using php5 you must create this file. Also to have changes take affect, you have to launch your godaddy control panel, and go to content > processes and click End Web. Documented here
Priya Infotech said
Finally it’s working.
I did tried everything and still it was not working. I did read this page 100 times but still it was not working. Luckily I read Momo’s comment and after that I just did what godaddy told us to do and now it’s working fine. Thanks to everybody and special thanks to Momo.
mantegna said
Lorem ipsum dolor sit amet consectetuer id ut consectetuer elit orci. Ut leo eu natoque Sed ante quam laoreet interdum nulla at. Suscipit eros In magnis metus Nam est Maecenas lobortis mauris facilisi. Pretium condimentum leo ligula id tempor vel Donec nulla tempus commodo. Sem in consequat sed quis consectetuer.
Ipsum Aenean ut ipsum quis sed at feugiat dolor id semper. Cursus quis nibh sociis laoreet Fusce Vivamus rutrum Sed nulla at. Congue Suspendisse pellentesque ut quis orci Phasellus non mollis interdum consequat. Augue justo pretium id nibh adipiscing habitant ut tincidunt Nullam lorem. Orci faucibus lorem dictumst at Quisque tristique amet.
In urna volutpat Aenean dictum hac ut ac dictumst Aenean Donec. Augue Sed magna wisi hac justo sociis felis at mauris Sed. Integer gravida Sed vel tristique velit Nullam lacinia Curabitur faucibus tincidunt. Ullamcorper neque dictum ut a penatibus id tempus nulla felis turpis. Et ipsum nec Vestibulum pede cursus gravida ante Maecenas Vivamus eu. Sapien justo elit massa.
Sed at condimentum arcu malesuada ut ipsum Donec nunc felis Vestibulum. Pretium Integer id quis Fusce faucibus Praesent id egestas nec et. Ipsum Nunc libero mi odio ipsum semper Quisque egestas mauris adipiscing. Mauris Nulla mus Vestibulum dolor eros tortor nisl Donec Sed tellus. Eu vel Donec nibh ut consequat id Phasellus interdum sem turpis. Ut ornare et.
Justo urna malesuada dictum augue Maecenas velit et buy tickets Aenean Vestibulum condimentum. Sed ridiculus interdum diam sed Pellentesque nisl et ultrices aliquam Quisque. Sed Aliquam feugiat fames libero massa condimentum pulvinar sed metus fringilla. Neque tortor Vestibulum tincidunt consectetuer auctor sed sem a Phasellus tempor. Aliquet interdum condimentum tortor nulla Sed et auctor eget porttitor dui. Fames Proin at Vestibulum a ante vitae condimentum Lorem Sed Cras. Vestibulum.
Risus lorem aliquet tellus adipiscing ante Sed orci hac porta nibh. Et ut suscipit Nam natoque diam Suspendisse tellus id senectus tempus. Dictum tincidunt Nulla congue Sed laoreet Aenean ac Aenean commodo felis. Fusce congue dui at nec wisi Curabitur ante condimentum elit nunc. Curabitur elit nibh porttitor et tincidunt et Phasellus.
Porttitor vitae rhoncus odio sollicitudin suscipit lacus sagittis justo tellus ac. At Quisque at fringilla laoreet et Vestibulum Aliquam euismod leo tellus. Quisque Vivamus at Proin id lorem wisi tellus Donec justo tincidunt. Commodo neque mollis vitae tellus ut Nam senectus id Nam pede. Sed ipsum sagittis senectus vel amet enim id nulla semper Morbi. Quisque dui malesuada a Phasellus Sed eget et et Nulla.
Non pulvinar porttitor volutpat egestas est pellentesque quis nibh volutpat Quisque. Amet semper Aliquam congue orci pellentesque nibh neque nibh porta tellus. Sed tortor malesuada semper pretium sociis leo laoreet Maecenas Vivamus hendrerit. Phasellus ut penatibus eget dui elit felis dui in consectetuer Duis. Nulla et turpis metus non adipiscing.
Tom @ Google serach redirecting fix said
Tom @ Google serach redirecting fix…
[…]Deploying a Symfony Project on GoDaddy Shared Hosting « A Coder’s Corner[…]…
wehostia.com said
wehostia.com…
[…]Deploying a Symfony Project on GoDaddy Shared Hosting « A Coder’s Corner[…]…
web hosting said
web hosting…
[…]Deploying a Symfony Project on GoDaddy Shared Hosting « A Coder’s Corner[…]…
domains said
domains…
[…]Deploying a Symfony Project on GoDaddy Shared Hosting « A Coder’s Corner[…]…
Epilogi Domain Name said
Epilogi Domain Name…
[…]Deploying a Symfony Project on GoDaddy Shared Hosting « A Coder’s Corner[…]…
Thakimhost said
Thakimhost…
[…]Deploying a Symfony Project on GoDaddy Shared Hosting « A Coder’s Corner[…]…
singapore vps said
singapore vps…
[…]Deploying a Symfony Project on GoDaddy Shared Hosting « A Coder’s Corner[…]…
furniture stores at tucson az said
furniture stores at tucson az…
[…]Deploying a Symfony Project on GoDaddy Shared Hosting « A Coder’s Corner[…]…
Cheapest hosting! Only 0.01 USD / 1st month. Just use the promo code: '1cent' said
Cheapest hosting! Only 0.01 USD / 1st month. Just use the promo code: ‘1cent’…
[…]Deploying a Symfony Project on GoDaddy Shared Hosting « A Coder’s Corner[…]…
Jeff said
I kinda like your blog. Would you mind telling the design theme and the settings? Thanks.
which monitor should i buy said
which monitor should i buy…
[…]Deploying a Symfony Project on GoDaddy Shared Hosting « A Coder’s Corner[…]…
here said
I love your wp format, where did you get a hold of it?
try improve your business said
This is a amazing weblog, would you be interested in going through an interview regarding just how you developed it? If so e-mail me!
address said
Wow! This website is sick! How can I make it look like this .
investigate advance cash said
After I open up your Rss feed it appears to be a ton of garbage, is the problem on my part?
change my life said
It looks to me that this site doesnt load in a Motorola Droid. Are other folks getting the exact same problem? I like this webpage and dont want to have to skip it any time Im gone from my computer.
account said
Whilst I actually like this post, I believe there was an punctuational error shut towards the finish from the third section.
wow accounts on-line said
Just to let you know your web page appears a little bit strange on Safari on my laptop with Linux .
hall hire aldershot said
Cool post ! Thank you for, writing on my blog mate! Ill email you soon! I didnt know that!
quickbooks consultant said
I enjoy your wp layout, where did you get a hold of it?
optimism said
pretty valuable stuff, all in all I imagine this is worthy of a bookmark, thank you
business bookkeeping services said
I Am Going To have to come back again when my course load lets up – however I am taking your Feed so i could read your blog offline. Thanks.
natural gas pipeline stocks said
Have you given any thought at all with translating your webpage in to Chinese? I know a few of translaters right here that will would certainly help you do it for free if you want to make contact with me personally.
investigate motorbike games said
Is it fine to insert a portion of this on my personal web site if I publish a reference point to this webpage?
dub anime said
You ought to really moderate the responses on this page
the how to teach said
The structure for your website is a bit off in Epiphany. Even So I like your web site. I might need to use a normal browser just to enjoy it.
visit budapest said
Re: The person who produced the statement that this was an excellent website actually needs to get their head examined.
chandler realtor said
Re: Whomever produced the remark that this was a good internet site genuinely needs to have their brain examined.
bathroom remodeling phoenix, bathroom remodeling az, phoenix kitchen remodeling, kitchen remodeling az, home remodeling phoenix said
Have you given any kind of consideration at all with converting your current website into German? I know a small number of translaters right here which might help you do it for free if you want to get in touch with me personally.
homepage said
This blog is pretty cool! How was it made !
clicking here said
Jesus Christ theres plenty of spammy comments on this web site. Have you ever before thought about trying to remove them or installing a plugin?
wholesale doghealthinsurance.org.uk said
I believe that one of your advertisements initiated my internet browser to resize, you may well want to get that on your blacklist.
personalisation agenda said
I tried looking at your blog with my mobile phone and the structure does not seem to be right. Might want to check it out on WAP as well as it seems most smartphone layouts are not really working with your web page.
this month said
Nearly all of the comments on this website dont make sense.
djs in atlanta said
Heya, I just hopped over to your site via StumbleUpon. Not somthing I might generally read, but I appreciated your thoughts none the less. Thank you for making some thing worthy of browsing.
sleep apnea doctor boca raton said
A cool post right there mate . Thank you for it .
forex brokers article said
How did you make a site look this good! Email me if you can and share your wisdom. Id be thankful!
landscape muskego said
I believe that one of your advertisements triggered my internet browser to resize, you might well need to set that on your blacklist.
cosmetic dentistry nyc said
You should really moderate the remarks on this site
caribbean honeymoon destinations all inclusive said
This site has some extremely helpful information on it. Thank you for informing me.
san diego electrician said
pretty valuable material, all in all I imagine this is worthy of a book mark, thanks
TM said
Mate! This blog site is awesome! How did you make it look this good .
jump button said
Weird , this page shows up with a dark color to it, what color is the primary color on your web-site?
spinach recipe said
Whenever I initially commented I clicked on the Notify me whenever new comments are added checkbox and now each time a remark is added I get 4 email messages with the identical comment.
earth dog story said
I was basically curious about if you ever thought of adjusting the design of your blog? Its well written; I love what youve got to state. But maybe you could include a little more in the way of written content so people could connect to it better. Youve got a great deal of wording for only having one or two photos. Maybe you could space it out better?
account said
This website has some extremely helpful info on it. Thank you for sharing it with me.
mlm said
Cool post . Cheers for, posting on this blog page man. Ill email you some time. I did not realise that!
your big bear fitness said
Wanted to drop a remark and let you know your Rss feed is not working today. I tried including it to my Yahoo reader account and got nothing.
san francisco dentist, san francisco cosmetic dentist, dental implants san francisco , cosmetic dentist san francisco, san francisco implant dentist said
I Will have to return again whenever my course load lets up – nonetheless I am taking your Rss feed so i could go through your site offline. Cheers.
buy quick payday loans no credit check said
How come you dont have your web site viewable in mobile format? Can not view anything in my iPad.
cometic dentist augusta ga said
I experimented with viewing your web site with my ipod touch and the page layout doesnt seem to be right. Might wanna check it out on WAP as well as it seems most cellular phone layouts are not really working with your website.
veneers in flagstaff az said
Re: The person who made the comment that this was a good web site truly needs to have their head evaluated.
appstar scam said
Mate! This blog is cool! How do you make it look this good .
surrey web design said
I tried taking a look at your web site in my iphone and the page layout doesnt seem to be right. Might wanna check it out on WAP as well as it seems most smartphone layouts are not working with your site.
caregiving culver city said
You should really control the comments listed here
jay mabazza said
4 years later, your patch still works!
Lissa Needham said
I quite like reading an article that can make men and women think. Also, thank you for allowing for me to comment!
Gino said
I have read so many articles regarding the blogger lovers but this piece of writing is genuinely a good article, keep
it up.
European Dating Sites Related Articles said
I always emailed this weblog post page to all my contacts, as if like
to read it next my links will too.
Natural Anxiety Remedies Tips said
Thanks a bunch for sharing this with all of us you actually know what you are speaking about!
Bookmarked. Kindly also consult with my site =). We
may have a link change contract among us
relationship fix said
I don’t even know the way I ended up here, however I thought this publish was once good. I don’t understand who you might be but certainly you are going to
a well-known blogger in the event you aren’t already. Cheers!
shorten website links said
Pretty great post. I just stumbled upon your weblog and wished to mention that I’ve really enjoyed browsing your weblog posts. After all I’ll be subscribing on
your rss feed and I’m hoping you write once more very soon!
buy web traffic visitors guaranteed said
We stumbled over here from a different web address and
thought I may as well check things out. I like what I see so now i’m following you. Look forward to looking at your web page again.
ecig coupon codes said
After going over a few of the articles on your
web page, I honestly like your way of writing a blog. I bookmarked it to my bookmark website
list and will be checking back in the near future.
Please check out my web site too and let me know how you feel.
Thurman said
Greetings! I’m from Salt Lake City and completed the University of Oregon with a finance degree. My name’s Thurman
and I always like to explore and talk about
accounting. Excellent article on a issue I am really knowledgeable about.
wordpress developer said
This put will take some time, so please be patient there are a
lot of files to be transferred. You still have to work on SEO,
but since Google loves new content and WordPress makes adding
new content a breeze the SEO advantage goes to WordPress.
Outlook of a website has become an imperative part of its success.
How do I use GoDaddy to host Symfony 1.4 project? | BlogoSfera said
[…] have command-line access to the Godaddy Shared Hosting server, and I’ve tried following https://gfaraj.wordpress.com/2008/04/25/deploying-a-symfony-project-on-godaddy-shared-hosting/ but it seems to be using a much older version of Symfony. Any help? I’m willing to change […]
Robert said
Hiya! Quick question that’s totally off topic. Do you know how to make your site mobile friendly? My site looks weird when browsing from my iphone 4. I’m trying to find a theme or plugin that might be able to fix this
issue. If you have any suggestions, please share. Many thanks!
labrador retriever shedding said
Hi there! I know this is kinda off topic nevertheless I’d figured I’d ask.
Would you be interested in exchanging links or maybe guest
authoring a blog article or vice-versa? My website goes over a lot of the same subjects as yours and I feel we could greatly benefit from each other.
If you might be interested feel free to shoot me an email.
I look forward to hearing from you! Fantastic blog
by the way!
transvaginalmesh lawsuit said
It’s perfect time to make some plans for the longer
term and it’s time to be happy. I’ve learn this submit and if
I may just I desire to suggest you few fascinating things or tips.
Maybe you could write next articles relating to this article.
I desire to read more issues about it!
Joe said
I’m not sure why but this weblog is loading incredibly slow for me.
Is anyone else having this issue or is it a issue on my end?
I’ll check back later and see if the problem still exists.
web page said
Incredible! This blog looks just like my old one! It’s on a entirely
different topic but it has pretty much the same layout and design. Outstanding
choice of colors!
web hosting server said
I was curious if yyou ever considered changing the page layout of your site?
Its very well written; I love what youve
got to say. But maybe yyou could a little more in the way of content
soo people could connect with it better. Youve got an awful lot of text
for only having 1 or 2 images. Maybe you could space it out better?
desert food recipes said
Hello to every , because I am really keen of reading this weblog’s post to be updated regularly.
It consists of good stuff.
Enabling SSI in JBoss? - Zupancic Gyan said
[…] You can exercise symfony on GoDaddy's common hosting plan… designation instructions are here https://gfaraj.wordpress.com/2008/04/25/deploying-a-symfony-project-on-godaddy-shared-hosting/ […]
dui attorneys in Michigan said
dui attorneys in Michigan
Deploying a Symfony Project on GoDaddy Shared Hosting « A Coders Corner
Yamaha Parts Online said
Yamaha Parts Online
Deploying a Symfony Project on GoDaddy Shared Hosting « A Coders Corner
sell themes wordpress said
you are in point of fact a good webmaster. The site loading speed is amazing.
It sort of feels that you are doing any unique trick.
Also, The contents are masterwork. you have performed a excellent job on this subject!
marjie said
Eli Lilly and Company knows better and we question why the web siteclassified Attention Deficit Disorder as a “disease,” and one thatpeople “have a remission” from. Kate Upton’s boyfriend Justin Verlander underwent a core muscle repair surgery following a December injury last Wednesday (January 15, 2014).What firms sagging skin is by simply including in your skin careregimen anti-oxidants that have been correctly formulated.
Brooke Matsko said
Deploying a Symfony Project on GoDaddy Shared Hosting
[…]Drake needa get some mo liposuction[…]
Tary said
How’s things?, sometimes I get a 404 site message when I arrive at your website. I thought you may wish to know, best wishes
Oliver Dev said
You could have used Envoyer or git to deploy your symfony app easily. Also, why shared hosting. Shared servers have poor performance and security. A better option is vps, if you have sysadmin skills. Otherwise use platforms like Cloudways symfony hosting to host your symfony app on managed servers that are scalable and have better performance.
Evan Dethridge said
Hi there!
You Need Leads, Sales, Conversions, Traffic for wordpress.com ? Will Findet…
I WILL SEND 5 MILLION MESSAGES VIA WEBSITE CONTACT FORM
Don’t believe me? Since you’re reading this message then you’re living proof that contact form advertising works!
We can send your ad to people via their Website Contact Form.
IF YOU ARE INTERESTED, Contact us => lisaf2zw526@gmail.com
Regards,
Dethridge
Jennifer Jennings said
Wow, looks great, especially the end. I was looking for that topic for a few days
across the nest, but there was nothing valuable, only discovered this https://thecincinnatusstandard.com/sample-essay-on-corporate-social-responsibility-2/, but still so happy to reach your post in the end.
I am keen on that subject, and I want to be always aware of the most recent news.
That is a joy to read your article and eventually clarify myself.
Jennifer Shields said
The article reveals some burning questions and issues that needs to be discussed and clarified.
Furthermore, it’s essential to understand within the very detail.
In the post, an individual can easily locate something basic,
unusually for him, something which will be immensely
useful. So I am thrilled with the data that I have just obtained.
Thanks a lot!
are speaking said
May I just say what a comfort to uncover an individual who truly knows what they’re talking about on the web. You certainly know how to bring an issue to light and make it important. More people really need to read this and understand this side of the story. I can’t believe you are not more popular since you surely possess the gift.