http://gfaraj.wordpress.com/2008/04/25/deploying-a-symfony-project-on-godaddy-shared-hosting/
Next,
you need to modify the .htaccess file. Go ahead and uncomment the RewriteBase line in the default symfony .htaccess file:
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:
php5.ini
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 existAs 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 = 1This 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 "Application error
symfony application failed to start properly"
0 comments:
Post a Comment