Running CGI's locally on OSX

Sivakatirswami katir at
Fri Jul 5 00:05:01 EDT 2002

> From: "Mark Paris" <mparis at> wrote

> What do you get when you try:
> http://my.machine.ip/ or http://localhost/ ???

Thanks Mark, the macDevCenter page on Apache for OSX was useful, if only to
help get some more terminal skills up and running...and yes, you are right
http://my.machine.ip/cgi-bin/ does map to the /Library/ and I am getting the
default Apache page...

OK,  I uncommented the httpd.conf file at the point where the

 AddHandler cgi-script .cgi

As this was the sole semi- related recommendation and also recommended by
Richard MacLemale last year... (Though that should not affect running CGI's
in the /Library/WebServer/CGI-Executables/ which should be enabled by
default...according to the MacDevCenter article)

Theoretically there is nothing else to do.  OK. So far so good,  but, now I
am getting a 

"Premature end of script headers" error message in the error_log when trying
to  call this script:

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.

--Darwin engine downloaded and installed into
--And the above test script as well... Both files permissions set to CHMOD
--"AddHandler cgi-script .cgi " was enabled in the httpd.conf file
--But http://my.machine.ip/cgi-bin/test-mc.cgi still doesn't work
--Error log says: "Premature end of script headers:


Hinduism Today

Editor's Assistant/Production Manager
katir at,,,

Read The Master Course Lesson of the Day at

More information about the Use-livecode mailing list