From owner-freebsd-isp Thu Jun 21 20:17:21 2001 Delivered-To: freebsd-isp@freebsd.org Received: from ren.sasknow.com (ren.sasknow.com [207.195.92.131]) by hub.freebsd.org (Postfix) with ESMTP id 0660637B401 for ; Thu, 21 Jun 2001 20:17:16 -0700 (PDT) (envelope-from ryan@sasknow.com) Received: from localhost (ryan@localhost) by ren.sasknow.com (8.9.3/8.9.3) with ESMTP id VAA96520; Thu, 21 Jun 2001 21:17:09 -0600 (CST) (envelope-from ryan@sasknow.com) Date: Thu, 21 Jun 2001 21:17:09 -0600 (CST) From: Ryan Thompson To: Sean Chittenden Cc: Troy Settle , freebsd-isp@FreeBSD.ORG Subject: Re: mod_perl In-Reply-To: <20010620155204.C74413@rand.tgd.net> Message-ID: Organization: SaskNow Technologies [www.sasknow.com] MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Sean Chittenden wrote to Troy Settle: > > I'm far from a perl guru. Does apache automatically execute perl cgi > > scripts via mod_perl or do the scripts need to be explicitly written for it? > > Normal perl CGI scripts _should_ work under mod_perl. Check > out the following places for more information about this: > > http://perl.apache.org/ > http://perl.apache.org/guide/ > > -Sean > > PS The guide is especially useful and has the answers you're > probably looking fore 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". 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 2. mod_perl will not work for any old cgi directory (scriptalias). Using scriptalias (the normal Apache way of doing things) will disable mod_perl for that cgi directory. Instead, use a directive and specify the perl handler in your virtual host container: Alias /cgi-bin/ "/home/user/cgi-bin" SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI PerlSendHeader ON 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 -- Ryan Thompson Network Administrator, Accounts SaskNow Technologies - http://www.sasknow.com #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2 Tel: 306-664-3600 Fax: 306-664-1161 Saskatoon Toll-Free: 877-727-5669 (877-SASKNOW) North America To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message