So basically i want to run script that will make around 15k pdf files, and it needs to be done from shell because of php max_timeout...
Server: Ubuntu 10.04.1 PHP : 5.3.2-1ubuntu4.5
So what i currently tried:
function run_in_background($Command){
$ps = shell_exec("nohup php5 $Command > /dev/null 2> /dev/null & echo $!");
return $ps;
}
$ok = run_in_background('/var/www/custom/web/public/make_pdf.php');
if(!empty($ok))
var_dump($ok);
else
exit('Fail');
And after that i go to ssh console and do ps $ps
and in response i get headers only with no info - witch means process is not running...
How can i do this so it works?