Thread: php and exec
View Single Post
  #11  
Old 10-06-2012, 03:54 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
so:
1.the output of which is correct. since $PATH is empty
2.the output of "env", no PATH, this also show that $PATH is empty
3.why $PATH is empty, need further investigate.
4.
in exterl app lsphp5's definition, add
PATH=/usr/local/bin:/bin:/usr/bin
to Environment, the output is what expected:
Quote:
:: [echo $PATH]
/usr/local/bin:/bin:/usr/bin

:: [echo ]


:: [PATH=/usr/local/bin:/bin:/usr/bin /usr/bin/which ls]
/bin/ls

:: [/usr/bin/which ls]
/bin/ls

:: [id]
uid=555(shooting) gid=555(shooting) groups=555(shooting)

:: [alias]

:: [env]
PHPRC=/home/shooting/
PATH=/usr/local/bin:/bin:/usr/bin
PWD=/home/shooting/public_html/Darladog
SHLVL=1
_=/bin/env
5.my local linux box, without set PATH explicitly in lsphp5's Environment, it still show PATH:
PATH=/bin:/usr/bin
Reply With Quote