CGI's on a linux server
Michael Doub
Mike at Doub.com
Tue Mar 11 21:21:27 EDT 2008
I have been able to install the current engine on my ISP's linux server in
cgi-bin and am able to run the simple hello world script. I am now trying
to take the next step in having my script "start using" another stack but I
am having difficulties.
#!revolution
global gDataA
on startup
start using stack "rocketscgi.rev"
put the defaultFolder into foo
cgiOutput foo
end startup
This is generating the following message in the server log:
[Tue Mar 11 20:56:49 2008] [error] [client 99.236.160.190] Premature end of
script headers: /home/doub/public_html/cgi-bin/helloworld.cgi
/home/doub/public_html/cgi-bin/revolution: Script execution error at line 4,
column 9
I have tried numerous permissions on the "rocketscgi.rev" stack file and as
you can see have even tied to force the name to all lower case.
Can someone advise me as to what the permission of a stack should be?
Also the following script returns the correct path to cgi-bin:
#!revolution
global gDataA
on startup
-- start using stack "rocketscgi.rev"
put the defaultFolder into foo
cgiOutput foo
end startup
on cgiOutput pBody
if param(2) is not empty then
put param(2) into tMimeType
else
put "text/html" into tMimeType
end if
put "Content-Type: "& tMimeType & cr
put "Date:" && the internet date & cr
put "Host:" && $SERVER_NAME & cr
put "Content-Length:" && the length of pBody & cr & cr
put pBody
if the environment is not "development" then quit
end cgiOutput
I am quite sure I am missing something simple, but I am currently stumped.
-= Mike
More information about the use-livecode
mailing list