Running CGI's locally on OSX

Sarah sarahr at genesearch.com.au
Fri Jul 5 01:38:01 EDT 2002


Trying the same thing, my error log gets 2 entries:

[Fri Jul  5 16:17:18 2002] [error] (2)No such file or directory: exec of 
/Library/WebServer/CGI-Executables/hello.cgi failed
[Fri Jul  5 16:17:18 2002] [error] [client 192.168.0.14] Premature end 
of script headers: /Library/WebServer/CGI-Executables/hello.cgi

I downloaded the Darwin engine and put it in the relevant CGI folder. I 
used virtually the same hello world script as used below, saved it in a 
text file, set it's permissions and tried the following in my browser:
	http://my.ip.address/cgi-bin/hello.cgi
  OS X is just using Apache, same as most of the world, so it seems this 
should work. Any ideas would be much appreciated.

Sarah


On Friday, July 5, 2002, at 03:04  PM, Sivakatirswami wrote:

>> From: "Mark Paris" <mparis at nc.rr.com> wrote
>
>>
>> What do you get when you try:
>>
>> http://my.machine.ip/ or http://localhost/ ???
>>
> [SNIP]
>
> 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:
>
> ======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.
>
> recap:
> --Darwin engine downloaded and installed into
> /Library/WebServer/CGI-Executables/
> --And the above test script as well... Both files permissions set to 
> CHMOD
> 755
> --"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:
> /Library/WebServer/CGI-Executables/test-mc.cgi"
>
>
>
> Hinduism Today
>
> Sivakatirswami
> Editor's Assistant/Production Manager
> katir at hindu.org
> www.HinduismToday.com, www.HimalayanAcademy.com,
> www.Gurudeva.org, www.hindu.org
>
> Read The Master Course Lesson of the Day at
> http://www.gurudeva.org/lesson.shtml
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>





More information about the Use-livecode mailing list