[Zope] CGI script and ZServer
Hung Jung Lu
hungjunglu@hotmail.com
Fri, 31 Mar 2000 10:09:32 PST
michal bukovjan <m_bukovja-@advis.cz> wrote:
original article:http://www.egroups.com/group/zope/?start=27607
>Is it possible to run an arbitrary CGI script (written in Perl) from
>within Zope's dedicated ZServer ?
The short answer is yes.
But your performance varies depending on how deep you want
to get into the subject. The most simple way to run Perl
CGI is:
(1) Use a Python external method to handle all CGI request.
Let's call it "cgi_bin".
(2) Your CGI URL requests would be something like:
http://www.mysite.com/cgi_bin?cgi=mycgi.pl&arg1=var2&arg2=var2
(3) Inside your external method, you check the values of
REQUEST.cgi, REQUEST.arg1, REQUEST.arg2 and use Python
pipe commands to launch the Perl interpreters and capture
the output. (On Windows, use functions from the win32pipe
module in Python's Win32 extensions.)
There was some discussion on all this about a week ago. Please
read the thread "newbie CGI question":
http://www.egroups.com/group/zope/showthread.html?start=26666
If you don't like the look of the URL, you can still use
Zope's SiteAccess product to tweak and interprete a URL like
htpp://www.mysite.com/cgi-bin/mycgi.pl?arg1=var1&arg2=var2
But in order to achieve decent response time, you will have to use
Apache + mod_rewrite + mod_perl + Zope. Which is more involved.
Hung Jung
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com