[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] MacPerl and WebSTAR



On Wed, 16 Jul 1997, JAlexander@edc.org (JAlexander) wrote:
> I am teaching a summer class to high school students on how to cgi
> program in perl, however, I have just learned that the server that we
> will be using is a Mac server and not a UNIX server and unfortunately
> the system administrators here have not dabbled in cgi/perl - and are much
> too overwhelmed to start.
>
> Needless to say, I have inherited the responsibility of setting all of this
> up, and am pleased to have found the MacPerl port. However, I have not been
> able to locate documentation on how to configure a WebSTAR server to utilize
> MacPerl.
>
> Does anyone know if this is possible? Is it something that I have to
> configure within MacPerl? Do I need any additional software? Does MacPerl
> have to be installed on the server? Does MacPerl need to be running
> continuosly? Do I need to specify a cgi-bin(s)? Am I approaching this from
> too much of a UNIX standpoint?
>
> Any information that any of you can provide would be greatly appreciated by
> both myself and the kiddoes.  Thanks.
>

If the Web server is a Macintosh with WebStar, even if I did never use it, I  
suppose it will be as easy as with another webserver. All you have to do is to  
let MacPerl run in the background, and you just have to get the save all your  
Perl CGI scripts as "MacHTTP CGI" (menu "File", item "Save as...").

Then, when you want to execute your CGI, your go in a Web browser (such as  
Netscape or Internet Explorer, but if you want to have a quick system, I  
recommend you to use NCSA Mosaic 3 if you want advanced HTML features, or the  
simple MacWeb, which has the advantages to take little memory, and to be very  
quick and stable). Then you type the adress of your Macintosh in the address  
line of the browser, this is the URL. It should be something like :

    http://your.mac.name/path/your-script.cgi

Note that your mac can have a name, but very often you'll have to type your  
IP address. The path to type is the path path from the directory of the  
webserver to your script, but remember to use '/' as path seperator.

For example, if your Mac IP is 1.2.3.4 and your CGI "example.cgi" is in the  
directory "students" in the directory "cgi-bin" in the webserver directory,  
your URL will be :

    http://1.2.3.4/cgi-bin/students/example.cgi

Or if you want to pass data to your CGI, your just have to write a HTML file  
with a FORM sending the data to your CGI.. something like this :

<FORM Action="http://1.2.3.4/cgi-bin/students/example.cgi" Method="GET">

<!-- Here your put your text and your inputs... -->
<!-- For example : -->
Enter your name : <INPUT TYPE="Text" NAME="name">
Gender : <INPUT TYPE="Radio" NAME="gender" VALUE="male"> Male<BR>
         <INPUT TYPE="Radio" NAME="gender" VALUE="female"> Female<BR>
<!-- End example -->

<INPUT TYPE="Submit">
</FORM>

Good luck.

-------------------------
APERGHIS-TRAMONI Sebastien
Word Wide Web : http://www.resus.org/~madingue
E-Mail : madingue@cis.uni-muenchen.de
        (madingue@tango.resus.univ-mrs.fr)

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch