From owner-freebsd-questions@FreeBSD.ORG Mon Nov 10 21:53:47 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A2681065674 for ; Mon, 10 Nov 2008 21:53:47 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 9E8388FC2C for ; Mon, 10 Nov 2008 21:53:46 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.3) with ESMTP id mAALrcYV043579; Mon, 10 Nov 2008 21:53:40 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.7.2 smtp.infracaninophile.co.uk mAALrcYV043579 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1226354020; bh=8PuhSeG9G2Ol7l RPAW7fLawIsXY3dzFrtlzXxKVuxwE=; h=Message-ID:Date:From:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:Cc:Content-Type: Date:From:In-Reply-To:Message-ID:Mime-Version:References:To; z=Mes sage-ID:=20<4918AD5C.4060005@infracaninophile.co.uk>|Date:=20Mon,=2 010=20Nov=202008=2021:53:32=20+0000|From:=20Matthew=20Seaman=20|Organization:=20Infracaninophile|User -Agent:=20Thunderbird=202.0.0.17=20(X11/20080929)|MIME-Version:=201 .0|To:=20Albert.Shih@obspm.fr|CC:=20Jerry=20McAllister=20,=20freebsd-questions@freebsd.org|Subject:=20Re:=20PATH=20pr oblem|References:=20<20081110110805.GK1302@obspm.fr>=09<20081110161 002.GA81960@gizmo.acns.msu.edu>=20<20081110203643.GH27646@obspm.fr> |In-Reply-To:=20<20081110203643.GH27646@obspm.fr>|X-Enigmail-Versio n:=200.95.6|Content-Type:=20multipart/signed=3B=20micalg=3Dpgp-sha2 56=3B=0D=0A=20protocol=3D"application/pgp-signature"=3B=0D=0A=20bou ndary=3D"------------enig1F9536E02E6E23114ABA699F"; b=HhQfJQjiGEGI7 ZWRdM47mw4/+oa+/Ur4cOCidlMEqhUfdRi/yO2t2V08PL5hW36HRf4PKyszk9vMwE87 DJxSWzwWsCss2tUkpEnSB0IOsGBXubeEHFM+o6k7aismazVRekb8xW/767str8dUlWS Ovhtb7ADc84WNKY7oUG31Vi8= Message-ID: <4918AD5C.4060005@infracaninophile.co.uk> Date: Mon, 10 Nov 2008 21:53:32 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.17 (X11/20080929) MIME-Version: 1.0 To: Albert.Shih@obspm.fr References: <20081110110805.GK1302@obspm.fr> <20081110161002.GA81960@gizmo.acns.msu.edu> <20081110203643.GH27646@obspm.fr> In-Reply-To: <20081110203643.GH27646@obspm.fr> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig1F9536E02E6E23114ABA699F" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (smtp.infracaninophile.co.uk [IPv6:::1]); Mon, 10 Nov 2008 21:53:40 +0000 (GMT) X-Virus-Scanned: ClamAV 0.94.1/8600/Mon Nov 10 19:40:23 2008 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS,URIBL_BLACK autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk Cc: Jerry McAllister , freebsd-questions@freebsd.org Subject: Re: PATH problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 21:53:47 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1F9536E02E6E23114ABA699F Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Albert Shih wrote: > Maybe my question is not very clear.... >=20 > The p5 package work in shell, because the PATH is in the shell.=20 >=20 > But when I use the application throught the web it's not working. But I= > don't known how to tell apache ? mod_perl ? the PATH.=20 If you're using mod_perl2, then Apache will default to setting up the environment perl sees as if perl was running as a separate CGI script. See:=20 http://perl.apache.org/docs/2.0/user/config/config.html#C_SetupEnv_ (defaults to 'On') You can modify the perl environment from httpd.conf using PerlSetEnv or PerlPassEnv. See:=20 http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlSetEnv_ http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlPassEnv_ Assuming you do mean $PATH -- the executable search path -- that should=20 be sufficient to fix your problem. If you're really after $PERL5INC --=20 the path to search for perl modules -- while you can use PerlSetEnv to=20 set that, it's special-cased not to be passed through when running in=20 taint-checking mode. It's generally cleaner to have a startup.pl=20 script you require from the Apache conf, and that can have a BEGIN { }=20 block where you modify @INC before loading modules. See http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlConfigRequi= re_ or (preferably): http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlPostConfigR= equire_ which does much the same thing as a perl 'require' statement -- the=20 difference between the two being that PerlPostConfigRequire happens=20 somewhat later in the configuration process. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig1F9536E02E6E23114ABA699F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkkYrWIACgkQ8Mjk52CukIwoTQCfUK4HsMfx2aVh7PrzBWsRwNnN Hl4AoI1/DuKkW1wAJpnzdyJ770vxUU4M =Javb -----END PGP SIGNATURE----- --------------enig1F9536E02E6E23114ABA699F--