J Matisse Enzer wrote:

On Apr 25, 2005, at 2:56 PM, Stas Bekman wrote:


Looks like a bug in perl. But it's hard to tell.

Matisse, please try to run it under the perl debugger to see where exactly it crashes. that'd be:

perl -d Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs PREFIX=/usr/local


OK, so i ran it under the debugger, and started stepping through, typing
n
at each debugger prompt, and eventually got bored and decided to let it run so i typed:
r
at the damn thing seemed to work - ran to the end without an error,
So I did a make clean and tried again, and it worked again (under the debugger),
so I did another make clean and ran the configuration without the debugger and it worked.

Heh, your system got scared when it saw that you know how to use the debugger :)


Then
   make
worked, and
   make test
fails with:

[Mon Apr 25 15:15:59 2005] [info] base server + 27 vhosts ready to run tests
.[Mon Apr 25 15:16:00 2005] [error] Insecure directory in $ENV{PATH} while running with -T switch at /usr/local/src/mod_perl/mod_perl-2.0.0-RC5/Apache-Test/lib/Apache/ TestConfig.pm line 1059.\nCompilation failed in require at /usr/local/src/mod_perl/mod_perl-2.0.0-RC5/t/conf/modperl_startup.pl line 17.\n\t...propagated at /usr/local/src/mod_perl/mod_perl-2.0.0-RC5/t/conf/modperl_startup.pl line 18.\nBEGIN failed--compilation aborted at /usr/local/src/mod_perl/mod_perl-2.0.0-RC5/t/conf/modperl_startup.pl line 20.\nCompilation failed in require at (eval 2) line 1.\n
[Mon Apr 25 15:16:00 2005] [error] Can't load Perl file: /usr/local/src/mod_perl/mod_perl-2.0.0-RC5/t/conf/modperl_startup.pl for server localhost:8529, exiting...

Please take a look at Apache-Test/lib/Apache/TestConfig.pm, it has a function that untaints the PATH:


# Temporarily untaint PATH
sub untaint_path {
    my $path = shift;
    ($path) = ( $path =~ /(.*)/ );
    # win32 uses ';' for a path separator, assume others use ':'
    my $sep = WIN32 ? ';' : ':';
    # -T disallows relative and empty directories in the PATH
    return join $sep, grep !/^(\.|$)/, split /$sep/, $path;
}

try to see why it failed to do the job, by dumping the values of $path before and after it (at around line 1059).

If you don't figure it out post it here.

May be on Mac you have a different path separator?


-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com

Reply via email to