Albert Shih wrote:

Maybe my question is not very clear....

The p5 package work in shell, because the PATH is in the shell.
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.

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.

(defaults to 'On')

You can modify the perl environment from httpd.conf using PerlSetEnv
or PerlPassEnv. See:

Assuming you do mean $PATH -- the executable search path -- that should be sufficient to fix your problem. If you're really after $PERL5INC -- the path to search for perl modules -- while you can use PerlSetEnv to set that, it's special-cased not to be passed through when running in taint-checking mode. It's generally cleaner to have a script you require from the Apache conf, and that can have a BEGIN { } block where you modify @INC before loading modules. See

or (preferably):

which does much the same thing as a perl 'require' statement -- the difference between the two being that PerlPostConfigRequire happens somewhat later in the configuration process.



Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                 Flat 3
PGP:     Ramsgate
                                                 Kent, CT11 9PW

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to