I have an upload script that uploads images to a server. I need a script to run in the background after the image is uploaded and moved by
First read this
It is basically pointing out that you need to create a script that takes two params ( filename, path)
Then you need to use the exec function
As pointed out by Brent Baisle in the comments below, "nohup" must be added infront of the script to execute independently (with a different parent pid)
exec('noup php scriptyoucreated.php '.$filename.' '.$path.' > /dev/null 2>&1 &');
This writes the output to dev/null, php should not block at this point, i have not tried, but in theory.