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

RE: [MacPerl] Re: serving CGIs



A webserver is just a client-server mechanism that takes an input in a
particular format and spits out its output in a particular format. It
doesn't have to be on the web unless you want the stuff you're serving to be
there, which for most people is the case. :)

Occasionally you have a need that can be addressed by a web server but isn't
a web solution. For instance, I use MacPerl to communicate with a CGI script
running under IIS on NT to perform a task (updating and generating
non-English Mac files automagically) that has to be done on NT, but its
results are used on the Mac through Services for Macintosh. Even though the
machine itself is on the Microsoft internal web, the application doesn't
need to be. I thought about writing a dedicated client-server solution for
what I wanted to do, but then realized that with a little rewriting I could
turn an existing script into a CGI and save myself an amazing amount of
time.

As for whether you need a webserver to serve CGIs, if there's some other way
I don't konw about it, but it wouldn't surprise me to find out that someone
has done it.

Cheers,
-- Creede

-----Original Message-----
From: Lasar Liepins [mailto:lasar@liepins.de]
Sent: Wednesday, October 06, 1999 5:51 AM
To: MacPerl ML (macperl.org)
Subject: [MacPerl] Re: serving CGIs


Hi.

>i presently trying to use "personal web sharing" in combination with
>netscape and macperl.

I use just the same combination.

>question 1) is there a way serve CGIs without a web server?

PWS _is_ a webserver.
You can of course run Perl scripts with MacPerl wihtout a Webserver, or
export them as MacPerl Runtimes, but I don't know about that.

>?2) if a webserver is necessary, does it have to be on the web?

Not in your case.

>?3) using "personal web sharing" on the web i am able to see my site
>but when i try to start a script it is just downloaded.  any suggestions?

Open the scripts in MacPerl, do a "Save As...", and choose "CGI Script"
as the file type.
If you are using BBEdit to write the scripts (like me), choose Export to 
-> CGI Script"
from the MacPerl menu.
Save the scripts in your webfolder as .cgi or .acgi, and you should be 
fine.

I did have exactly the same problem when I set up PWS on my Mac.

HTH,

Lasar L.

.sig _______________________________________
Lasar Liepins . lasar@liepins.de . nightmode
http://www.liepins.de/ . http://www.w42.de/

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org