cgi osx etc

Sadhunathan Nadesan sadhu at castandcrew.com
Mon Jul 8 12:02:02 EDT 2002


Hi

Just run the script directly from the command line and
see what error message you are getting back from either
Unix or MC.

Premature end of headers means apache got something that
was not prefixedwith the content type etc, ie, the
script didn't run.

Sadhu


| Message: 1
| Date: Fri, 05 Jul 2002 14:40:03 -0400
| Subject: Re: Running CGI's locally on OSX
| From: Richard MacLemale <rmaclema at tampabay.rr.com>
| To: <metacard at lists.runrev.com>
| Reply-To: metacard at lists.runrev.com
| 
| On 7/5/02 12:02 PM, "metacard-request at lists.runrev.com"
| <metacard-request at lists.runrev.com> wrote:
| 
| > "Premature end of script headers" error message in the error_log when trying
| > to  call this script:
| > 
| > ======test-mc.cgi
| > #!/mc
| > on startup
| > put "Hello" into buffer
| >   put "Content-Type: text/html" & cr
| >   put "Content-Length:" && the length of buffer & cr & cr
| >   put buffer  
| > end startup
| > =========
| > 
| > I don't know if this means that the MC Darwin engine is working or not...
| > 
| > Anyone else have clues? Again, seems simple, but doesn't work.
| 
| Couple of things to try.  One, I use #!mc and not #!/mc, but that's probably
| not your problem.  However, make sure that the script file you wrote is
| saved with UNIX line breaks!  Not Mac line breaks.  If you haven't already,
| grab a copy of Bbedit lite, which is free, free, free and awesome.  It can
| easily save your script with UNIX line breaks.  I'd guess that's the
| problem.



More information about the metacard mailing list