Date: Mon, 10 Nov 2008 21:53:32 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Albert.Shih@obspm.fr Cc: Jerry McAllister <jerrymc@msu.edu>, freebsd-questions@freebsd.org Subject: Re: PATH problem Message-ID: <4918AD5C.4060005@infracaninophile.co.uk> In-Reply-To: <20081110203643.GH27646@obspm.fr> References: <20081110110805.GK1302@obspm.fr> <20081110161002.GA81960@gizmo.acns.msu.edu> <20081110203643.GH27646@obspm.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4918AD5C.4060005>