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
--QCC2I/2CckNfI+Tr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > Two things you need to keep in mind: >=20 > 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=20 take some of the advantages of mod_perl w/o having to do the work to=20 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=20 strict;" and -w is your friend. Here's a config section to ponder. # httpd.conf Alias /cgi-perl/ /home/httpd/cgi/ =20 <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] >=20 > Alias /cgi-bin/ "/home/user/cgi-bin" > <Location /cgi-bin> > SetHandler perl-script > PerlHandler Apache::Registry > Options ExecCGI > PerlSendHeader ON > </Location> >=20 >=20 > Note that a mod_perl handler will NOT exec binary or other shell script > CGIs. For that you need to use scriptalias. >=20 > 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. >=20 > Hope this helps. >=20 > - Ryan --=20 Sean Chittenden --QCC2I/2CckNfI+Tr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Comment: Sean Chittenden <sean@chittenden.org> iEYEARECAAYFAjsyxwMACgkQn09c7x7d+q235gCdHBFiiOKenut0CwdR6feaAVEX R9sAn3Y21EMcfzzlbWpVw5FdfkjDomiJ =inwe -----END PGP SIGNATURE----- --QCC2I/2CckNfI+Tr-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010621211811.T90900>