Date: Thu, 21 Jun 2001 21:18:11 -0700 From: Sean Chittenden <sean@chittenden.org> To: Ryan Thompson <ryan@sasknow.com> Cc: Troy Settle <troy@psknet.com>, freebsd-isp@FreeBSD.ORG Subject: Re: mod_perl Message-ID: <20010621211811.T90900@rand.tgd.net> In-Reply-To: <Pine.BSF.4.21.0106212110080.82170-100000@ren.sasknow.com>; from "ryan@sasknow.com" on Thu, Jun 21, 2001 at = 09:17:09PM References: <20010620155204.C74413@rand.tgd.net> <Pine.BSF.4.21.0106212110080.82170-100000@ren.sasknow.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] > Two things you need to keep in mind: > > 1. Not all Perl source is compatible with mod_perl. Your scripts WILL > break if they are not coded in "the mod_perl way". Not necessarily, normal CGI's can exist under mod_perl and take some of the advantages of mod_perl w/o having to do the work to port the script to mod_perl. http://perl.apache.org/guide/porting.html#The_Script_Is_Too_Dirty_But_It_ http://perl.apache.org/guide/porting.html > Many perl scripts NOT written for mod_perl will not work correctly. > (Chances are they will WORK, but will start to produce WEIRD results > like incremental counters that work fine for awhile, then start > spitting out oddball numbers). Your choice: > > * (re)write the CGI for mod_perl > * Don't run the script under mod_perl ;~) There's some truth to this... and memory leaks, etc. "use strict;" and -w is your friend. Here's a config section to ponder. # httpd.conf Alias /cgi-perl/ /home/httpd/cgi/ <Location /cgi-perl> # AllowOverride None SetHandler perl-script PerlHandler Apache::PerlRun Options ExecCGI allow from all PerlSendHeader On # this is the important directive </Location> -sc > 2. [snip] > > Alias /cgi-bin/ "/home/user/cgi-bin" > <Location /cgi-bin> > SetHandler perl-script > PerlHandler Apache::Registry > Options ExecCGI > PerlSendHeader ON > </Location> > > > Note that a mod_perl handler will NOT exec binary or other shell script > CGIs. For that you need to use scriptalias. > > It is possible to make both a ScriptAlias CGI directory and a mod_perl CGI > directory and use both. For some virtuals here, we have a cgi-bin and a > cgi-perl, for example. > > Hope this helps. > > - Ryan -- Sean Chittenden [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Comment: Sean Chittenden <sean@chittenden.org> iEYEARECAAYFAjsyxwMACgkQn09c7x7d+q235gCdHBFiiOKenut0CwdR6feaAVEX R9sAn3Y21EMcfzzlbWpVw5FdfkjDomiJ =inwe -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010621211811.T90900>
