you need to manually (codially?) close every stack that you open in a cgi, otherwise you get that error.

On 12 Mar 2008, at 02:21, Michael Doub wrote:

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



_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to