From: Pat Eyler Date: 2002-05-11T05:24:55+09:00 Subject: Re: Premature end of script headers On Sat, 11 May 2002, Pat Eyler wrote: > On Sat, 11 May 2002, ccos wrote: > > > hello, > > i'm new to ruby, unix, apache, and cgi, so i feel like i'm wrestling a > > four headed dragon, well more like wrestling a three headed dragon and > > patting a friendly goat. > > i keep getting: > > Premature end of script headers: /Library/WebServer/CGI- > > Executables/cgiTrial2.cgi > > in my apache error log. > > im running os x with Marc Liyanage's distro, freshly installed. > > i don't think it's not a permissions problem, the file is chmod 755'd. > > my file is called cgiTrial2.cgi and contains: > > doh! I should have seen this before I sent the mail > > #!/usr/local/bin ruby << i think this is right? #!/usr/local/bin/ruby #assuming ruby is in /usr/local/bin > > > > print "HTTP/1.0 200 OK\r\n" > > print "Content-type: text/html\r\n\r\n" > > print "Hello World!\r\n" > > > > this is saved as an asci file w/ unix breaks. > > any ideas? > > what happens when you run the script from the command line? > -pate > -pate > > > > thanks much, > > _c > > > >