0

I have searched a lot and now I am in confuse. I want to do background process for moving photos facebook to my server. moving photos works fine. but now I want to do it using background process(if user close the browser process still works till it done). I have used below code.

exec("move-background.php > /dev/null &");

It doesn't works. move-background.php contains the code of moving photos. plese explain me how to do background process in php and please give the extra setting for Heroku. because heroku doesn't provides settings for PHP. Explain me in detail if possible.

I reefered Running continuous PHP applications on free Heroku but it is not understandable for me. I am new in cmd plese help me

Community
  • 1
  • 1
Akash
  • 123
  • 1
  • 13

1 Answers1

0

I don't know much about background processes in php, but I would recommend you to use the php_ini setting called "ignore_user-abort" and "max_execution_time. But you have to be careful with these settings or your script will run infinitely.

papa zulu
  • 317
  • 5
  • 16
  • zulli Heroku allows maximum 30 second for execution. So I can't use `max_execution_time` and may be can not use even `ignore_user-abort` – Akash Sep 10 '14 at 10:39