# Apache 1.3 + FastCGI shared hosting problems

**URL:** <https://www.ruby-forum.com/t/apache-1-3-fastcgi-shared-hosting-problems/92891>\
**Category:** Radiant CMS\
**Created:** [April 25, 2007, 1:48pm UTC](https://www.ruby-forum.com/t/apache-1-3-fastcgi-shared-hosting-problems/92891 "2007-04-25T13:48:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mickey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ccd318/32.png) [@mickey](https://www.ruby-forum.com/u/mickey)\
**Post date:** [April 25, 2007, 1:48pm UTC](https://www.ruby-forum.com/t/apache-1-3-fastcgi-shared-hosting-problems/92891/1 "2007-04-25T13:48:45Z")

</div>

Hello,  
After uploading everything to my hosting which supports RoR, I got:  
Application errorRails application failed to start properly"

Error log from CPanel:  
[Wed Apr 25 04:35:05 2007] [error] [client 88.118.141.35] Premature end  
of script headers: /home/davidlt/public\_html/portal2/public/dispatch.cgi  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/404.shtml  
[Wed Apr 25 04:33:50 2007] [error] [client 88.118.141.35] File does not  
exist: /home/davidlt/public\_html/favicon.ico

Website: [http://www.davidlt.profusehost.net/portal2/public/](http://www.davidlt.profusehost.net/portal2/public/)

Steps I did before trying to launch it:

1. I uploaded all Radiant files to server using FTP.
2. I went to public directory and changed \*.cgi, \*.fcgi, \*.rb files  
access to 755.
3. Edited \*.cgi and \*.rb files first line and changed path to ruby:  
/usr/local/bin/ruby
4. Created 3 DBs and edited database information files to use them.  
(Didn’t make SQL tables or anything like that).
5. In environment.rb uncommented “ENV[‘RAILS\_ENV’] = ‘production’”

---

<div class="post-metadata">

**Author:** ![mickey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ccd318/32.png) [@mickey](https://www.ruby-forum.com/u/mickey)\
**Post date:** [April 25, 2007, 5:13pm UTC](https://www.ruby-forum.com/t/apache-1-3-fastcgi-shared-hosting-problems/92891/2 "2007-04-25T17:13:25Z")

</div>

David A. wrote:

> Error log from CPanel:  
> [error] Premature end of script headers: /home/davidlt/public\_html/portal2/public/dispatch.cgi

Ok, something is not right. I don’t know how to tell you to fix it  
exactly, but my guess is that it is either:

1. The permissions aren’t set correctly

2. A library or file that dispatch.cgi is using wasn’t found or has the  
wrong permissions

The premature end of script headers means that the script is dying  
before it can even start up.

BTW, you are using CGI not Fast CGI. Is this intentional? CGI is not  
considered to be production worthy for Rails apps.

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![mickey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ccd318/32.png) [@mickey](https://www.ruby-forum.com/u/mickey)\
**Post date:** [April 25, 2007, 6:24pm UTC](https://www.ruby-forum.com/t/apache-1-3-fastcgi-shared-hosting-problems/92891/3 "2007-04-25T18:24:38Z")

</div>

hi All,

John W. Long wrote:

> 1. A library or file that dispatch.cgi is using wasn’t found or has the  
> wrong permissions
> 
> The premature end of script headers means that the script is dying  
> before it can even start up.
> 
> BTW, you are using CGI not Fast CGI. Is this intentional? CGI is not  
> considered to be production worthy for Rails apps.

I am getting the same kind of error (only running under  
apache2+mod\_fcgid on debian sarge)

I also get this:

[Wed Apr 25 15:45:50 2007] [notice] mod\_fcgid: server  
/var/www/radiant-test/public/dispatch.fcgi(30212) started  
/usr/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/railties/lib/rails\_generator/lookup.rb:33:in  
`expand_path': couldn't find HOME environment -- expanding `~’  
(ArgumentError)

permissions look fine.

unsure if thats a helpful addition, but thought i’d flag it anyway.

cheers,

–  
doug lang tel: +44 (1273) 808949  
\*nix sysadmin [http://www.netdotnet.net/](http://www.netdotnet.net/)  
technical consultant [mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
