I have a PHP file that invokes another PHP file via curl. I am trying to have the second file send a response back to the first to let it know that it started. The problem is th
The answer ended up being that CURL does not behave like a browser:
PHP Curl output buffer not receiving response
I ended up running my 2nd file first and my 1st file second. The 2nd file waited for a 'finished' file write that the 1st file did once it, obviously, finished.
At this point, it seems like the database would be a better place to store messages for files to be able to pass between each other, but a file would also work for a quick and dirty job.
This could be just what you're looking for. Forking in PHP:
http://framework.zend.com/manual/en/zendx.console.process.unix.overview.html
A process divides in two. One is father of the other. The father can tell the client he just begun and the child can do the job. When the child finishes, he's able to report the father which can also report to the client.
Keep in mind there are many requirements for this to run: