Getting MC CGI to work on OS X with "Web Sharing" turned on

Ken Ray kray at sonsothunder.com
Fri Oct 17 23:49:02 EDT 2003


Well, after getting my CGI to work on my ISP's Linux box, I thought
doing it in OS X would be a snap. Not so, brothers and sisters! Here's
what I've done and where I'm stuck:

1) I turned on Personal Web Sharing in the Sharing control panel (which
told me my web address was "http://192.168.1.100/~kenray/")

2) I went to the Sites folder on my hard drive (/users/kenray/Sites/)
and noted that it had created an index.html file. So far so good.

3) I created a "cgi-bin" directory in the Sites folder to hold my CGI.

4) I downloaded the Darwin MC CGI from the Metacard web site,
decompressed it down to its "mc" file, and put it into the new "cgi-bin"
folder I'd created.

5) I placed in the cgi-bin folder my "simple.cgi" script, which simply
dumps "Hello World" as a result. The first line in the script is "#!mc".

6) I set the permissions on both files to 777 (just in case).

7) I opened Terminal, went to the cgi-bin directory, and executed "./mc
simple.cgi", and got back this:

Content-type: text/html
Content-length:12

Hello World!

8) Thinking everything was going smoothly, I opened my browser and
navigated to "http://192.168.1.100/~kenray/", and got my entire script
dumped out into the browser. 

9) Ok, I said, it has something to do with the fact that OS X can't find
MC at #!mc, so I tried a variety of different paths (including full
paths (#!/users/kenray/Sites/cgi-bin/mc), partial paths (#!/cgi-bin/mc),
and the like, and none of them worked!

So here I am... stuck! Can anyone help me and tell me where I went
wrong?

Thanks in advance,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 




More information about the metacard mailing list