From owner-freebsd-isp Thu Jun 21 21:18:27 2001 Delivered-To: freebsd-isp@freebsd.org Received: from mail.tgd.net (rand.tgd.net [64.81.67.117]) by hub.freebsd.org (Postfix) with SMTP id 8DB2937B406 for ; Thu, 21 Jun 2001 21:18:17 -0700 (PDT) (envelope-from sean@mailhost.tgd.net) Received: (qmail 94537 invoked by uid 1001); 22 Jun 2001 04:18:11 -0000 Date: Thu, 21 Jun 2001 21:18:11 -0700 From: Sean Chittenden To: Ryan Thompson Cc: Troy Settle , freebsd-isp@FreeBSD.ORG Subject: Re: mod_perl Message-ID: <20010621211811.T90900@rand.tgd.net> References: <20010620155204.C74413@rand.tgd.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QCC2I/2CckNfI+Tr" Content-Disposition: inline In-Reply-To: ; from "ryan@sasknow.com" on Thu, Jun 21, 2001 at = 09:17:09PM X-PGP-Key: 0x1EDDFAAD X-PGP-Fingerprint: C665 A17F 9A56 286C 5CFB 1DEA 9F4F 5CEF 1EDD FAAD X-Web-Homepage: http://sean.chittenden.org/ Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --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 # AllowOverride None SetHandler perl-script PerlHandler Apache::PerlRun Options ExecCGI allow from all PerlSendHeader On # this is the important directive -sc > 2. [snip] >=20 > Alias /cgi-bin/ "/home/user/cgi-bin" > > SetHandler perl-script > PerlHandler Apache::Registry > Options ExecCGI > PerlSendHeader ON > >=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 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