You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Kevin Field <ke...@brantaero.com> on 2007/07/18 16:14:54 UTC
[mod_perl2] PerlSwitches having no effect?
Hi everyone,
I'm running Apache 2.2 with mod_perl2 on Win2k3sp2. I'm new to the mp/
mp2 world but have been working with it the last couple weeks, and am
fairly familiar with the docs and list archives, but for some reason I
can't figure out the following problem: PerlSwitches doesn't seem to do
anything.
Right before all the other LoadModules lines in my configuration file I
have:
PerlSwitches -wT
LoadFile "C:\Perl\bin\perl58.dll"
LoadModule perl_module modules/mod_perl.so
I have a script that uses "my" and therefore runs into that wonderful
inner subroutine problem. This ought to generate warnings. If I put
use warnings;
...at the beginning of said script, I *do* get all the appropriate
warnings. But I take that away, and the -w in my configuration file
seems to not be doing anything, because I get no messages in the log
(just a script that behaves strangely, of course :P .) (I suspect
taint checking might also not be properly enabled, given that my
sketchy preliminary whitelisting untaint function doesn't use regexes
or any magic, yet Perl does not complain.)
I have wracked my brain and searched for everything I could think of,
but to no avail. I've tried moving the PerlSwitches statement around
in the file: middle, end, whatever, no dice. I've tried plain -w. And
yes I've restarted Apache for each attempt.
Cluestick coming my way? Anyone?
Thanks for your time,
Kev
Re: [mod_perl2] PerlSwitches having no effect?
Posted by Kevin Field <ke...@brantaero.com>.
> On Wed, 18 Jul 2007 07:14:54 -0700 (PDT) "Kevin Field"
> <ke...@brantaero.com> wrote:
> > PerlSwitches -wT
> > LoadFile "C:\Perl\bin\perl58.dll"
> > LoadModule perl_module modules/mod_perl.so
>
> I don't know too much about Apache configuration, but you've
> put "PerlSwitches", which is defined in mod_perl.so, before you even
> load mod_perl.so.
>
> PerlSwitches should be set before the Perl *interpreter* is
> loaded, not before the module is loaded.
>
> Also, my PerlSwitches looks like:
>
> PerlSwitches -w -T
>
> I forget, but they may have to be separate.
>
> -Max
Ah, yes, I tried moving it to after those two lines, or in the middle
of the file somewhere, or at the very end of the file (well, right
before the stuff PHP put there), and it didn't change anything. Where
is the Perl interpreter loaded? I thought that was LoadFile "C:\Perl\
bin\perl58.dll"...but if mod_perl needs to be after that, and
PerlSwitches needs to be after mod_perl, but before the DLL...um...then
MC Escher may need to help write my config file. ;)
I tried them separately too (well, just the -w by itself anyway.)
Thanks for the suggestions though...
Kev
Re: [mod_perl2] PerlSwitches having no effect?
Posted by Max Kanat-Alexander <mk...@bugzilla.org>.
On Wed, 18 Jul 2007 07:14:54 -0700 (PDT) "Kevin Field"
<ke...@brantaero.com> wrote:
> PerlSwitches -wT
> LoadFile "C:\Perl\bin\perl58.dll"
> LoadModule perl_module modules/mod_perl.so
I don't know too much about Apache configuration, but you've
put "PerlSwitches", which is defined in mod_perl.so, before you even
load mod_perl.so.
PerlSwitches should be set before the Perl *interpreter* is
loaded, not before the module is loaded.
Also, my PerlSwitches looks like:
PerlSwitches -w -T
I forget, but they may have to be separate.
-Max
--
http://www.everythingsolved.com/
Competent, Friendly Bugzilla Services. And Everything Else, too.