[Discuss] Weird Apache backticks problem

Peter Scott Peter at PSDT.com
Mon Oct 9 10:02:01 PDT 2006


>>Hi, I thought I'd try here first on this.  I'm installing TWiki on a 
>>server that I don't control, and I have boiled a bizarre problem down 
>>to this: a (perl) program that executes a command in backticks will 
>>work in the cgi-bin directory, but hang elsewhere.
>It may be a perl config thing.
>When perl is built it finds the absolute path to
>a bunch of commands. Perhaps perl is, internally,
>appending an additional path onto the ls command.
>
>Have you tried removing the path from the command?

The problem turns out to come even before that.  I experimented some 
more. The problem is with fork(): when executed in the cgi-bin 
directory, it works.  But in this directory, it returns undef, with $! 
set to EAGAIN (resource temporarily unavailable), which explain the 
hangs on backticks, 'cos it's just going to keep trying to fork.  So I 
don't even have to exec() anything to have the problem.

I gave up and put everything under the cgi-bin directory and got 
further.  Although I sure would still like to know what caused this 
problem.   Now I have a different problem with this stupid !^&$@$ing 
hosting service (wouldn't have been my choice, but I'm trying to 
install a wiki on a non-profit's site and I don't get to make that 
decision).  They screwed up their setting of 
$SCRIPT_NAME.  Unfortunately SCRIPT_NAME is used in many places 
throughout TWiki.  I thought I could set it in .htaccess with 
mod_rewrite, but it appears that the web host prohibits doing this 
(results in 403, and yes, I did try +FollowSymLinks).

Is there any other way of setting an environment variable in .htaccess?

-- 
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com/
http://www.perlmedic.com/



More information about the Discuss mailing list