This is a difficult question, when developing the php + ajax application, I felt some long requests, nothing wrong with them, but they could be executed in the background.
I know that there is a way to simply send a response to the user, throwing the actual processing to another process using exec (), but it does not seem to me that this is right for me, it can lead to exploits, and this does not mean it is compatible with virtual servers and cross platform.
PHP offers ob_ * functions, although they help clear the cache, but the user will continue to connect until the script is run.
I am wondering if there is an alternative to exec to support the script after sending data to the user and closing the connection / stream using apache or a less "dirty" way of processing the processing data sent to another script.
source
share