Running CGI's locally on OSX

Richard MacLemale rmaclema at tampabay.rr.com
Fri Jul 5 14:43:02 EDT 2002


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.

-- 
:)
Richard MacLemale
Network Administrator
J. W. Mitchell High School




More information about the metacard mailing list