少し遅れましたが、人々にとって良い情報です。PHP 5.5.7 を使用した私の経験では。
mod_php を使用する PHP (標準の Apache):
ob_start();
header("Connection: close\r\n");
header('Content-Encoding: none\r\n');
// your code here
$size = ob_get_length();
header("Content-Length: ". $size . "\r\n");
// send info immediately and close connection
ob_end_flush();
flush();
// run other process without the client attached.
FastCGI および PHP_FPM を使用する PHP の場合:
// your code here
fastcgi_finish_request();
// run other process without the client attached.
fastcgi_finish_request()
が実行された後、機能しlog_error
なくなったことに注意してください。Apache への接続も切断されており、FastCGI と通信してエラーをログに記録できないことが原因であると推測されます。