I am using PHP exec command for execution of job on webserver. Initially It start executing job but was interrupted before completion of the job. While same job is running fine through SSH command.( user don't have sudo power) following is my code:
ob_start();
$pid=system("sh fold.sh $argument1 >/dev/null & echo $!");
ob_end_clean();
I also tried few methods to check the error but could not succeed.
I used test.txt and 2>&1 or 2>error.txt instead of /dev/null but not working Command(exec in php) is working only when I am using /dev/null. So I don't know where is the error. Why it is interrupted in between.
Any Idea what could be the problem?
normal time for job on SSH prompt(user:abc) : 14-20 hrs interruption time through php(user:daemon): 1-2 hrs