On Fri, 2009-01-16 at 15:55 +0000, Andy Smith wrote:
> Hi list,
> 
>    probably quite a basic question, but where does perl get its PATH  
> variable from when executig shell commands?
> 
> My problem is running Tr.pm which is part of the open source tool  
> smokeping, it does some nice things with traceroute. The weird problem  
> I have is that I have the same version of smokeping and Rt.pm on two  
> different servers and on one I have been getting the error "traceroute  
> no such file or directory" and on the other it works fine. The  
> commands are being called through apache whcih is running as www which  
> has no homedir, and the /etc/profile is the same on both servers. What  
> else can be different between them?
> I can get the error to go away by putting traceroute in /usr/bin, but  
> Id like to know why the perl code is fine on one server and not on the  
> other,
> 
> thanks for any suggestions! Andy.

Processes on *nix get their environment variables from their parents at
the time of the fork.

Is the $PATH the same on both servers?

Does the directories in the $PATH have the same executables?

Where is traceroute on both servers?


-- 
Just my 0.00000002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

"It would appear that we have reached the limits of what it is
 possible to achieve with computer technology, although one should
 be careful with such statements, as they tend to sound pretty silly
 in 5 years."
   --John von Neumann, circa 1950


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to