...
Code Block |
---|
set_time_limit(0); // do initial processing here . . . header('Connection: close'); flush(); fastcgi_finish_request();//required for PHP-FPM (PHP > 5.3.3) // now the request is sent to the browser, but the script is still running // so, you can continue your post processing below . . . end; // a must especially if set_time_limit=0 is used and the task ends |
In order to use fastcgi_finish_request(), you should install 'php-fpm' package. Below is the example to install php-fpm on CentOS 7
Code Block |
---|
sudo yum install php-fpm |
In addition, you should modify php.ini as following:
Code Block |
---|
cgi.fix_pathinfo=0 |