redirecting output inside a script run from php
Posted: Sat Feb 02, 2008 3:07 pm
Hi,
I am trying to execute a script in the following way
the run1.sh file has a simple execution of a shell command and then placing the pid of the process into a log file. the code is
Problem is that with any sort of redirection, the code either gives an error code as the value for ret_val and sometimes when it does return a zero (signifying success), the script fails to reach its objective.
I have tried chmod 666 for pidList.dat and it's folder but it still didn't work
Any help will be greatly appreciated
Thanks
Fahad
I am trying to execute a script in the following way
Code: Select all
exec("./run1.sh" ,$ret,$ret_val);Code: Select all
yes >> /dev/null &
echo $! >> pidList.dat
I have tried chmod 666 for pidList.dat and it's folder but it still didn't work
Any help will be greatly appreciated
Thanks
Fahad