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

Re: [MacPerl] MacPerl and WebSTAR



JAlexander,JAlexander@edc.org,Internet writes:
>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.  
It's hard to find. I know I looked all over the place for it and some of it was
just plain wrong.
>
>Does anyone know if this is possible?
Yes, it is. I use it all the time.

>Is it something that I have to configure 
>within MacPerl?
Not exactly. You just need to make sure you have the "tools" version of
MacPerl, which allows you to save your scripts as "CGI script"s. This is VERY
important. Macs ain't got no environment variables, so MacPerl saves special
versions of scripts that can fake it. Otherwise they just won't work.

>Do I need any additional software?
Nope.

>Does MacPerl have to be 
>installed on the server?
As far as I know, yes. Isn't that the way it works with UNIX, too?

>Does MacPerl need to be running continuosly?
I think the MacOS will start MacPerl if it isn't already running, so yes and
no.

>Do I 
>need to specify a cgi-bin(s)?
I don't think so, but it's usually a good idea to conform to that standard if
you ever want to port the site over to a UNIX box.

>Am I approaching this from too much of a UNIX 
>standpoint?
I dunno.
>
>
>Any information that any of you can provide would be greatly appreciated by
>both
>myself and the kiddoes.  Thanks.
You're welcome. There's a short document I have on my desk here that my boss
gave me a few months ago called "About WebSTAR SSI" that's extremely helpful.
Unfortunately, I have no idea where he got it from and I'm not about to part
with it. So, I'll give you some excerpts...

SSI is installed by default, but not activated. Add a suffix mapping for the
Action SSI to define which files you want WebSTAR SII to process. A common SSI
suffix is ".shtml"

Keep in mind that there is no "<!--#exec cgi=..." but you use "<!--#exec
script="value" post="value" --> ". And although they never say it, passing a
post value seems to be mandatory. The value can be read from STDIN in your CGI.

   read(STDIN, $Var, $ENV{"CONTENT_LENGTH"});        # gives $Var a value of
"value" from post

I think that's about all you need to know. Give it a try and if it doesn't
work, you can pick my brain some more. Something you may notice (you may not -
it may just be a problem with me) is that specifying the content as text/html
in the script is unnecessary and actually prints "Content-type: text/html" to
the screen!

Have fun
-josh
-----------------------------------------------------------------
                       Open Learning Agency
4355 Mathissi Place, Burnaby, B.C. Canada, V5G 4S8 (604) 431-3000


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