note 110184 added to features.connection-handling

From: Date: Thu, 27 Sep 2012 18:25:57 +0000
Subject: note 110184 added to features.connection-handling
Groups: php.notes 
Request: Send a blank email to php-notes+get-191047@lists.php.net to get a copy of this message
I was quite stuck when trying to make my script redirect the client to another URL and then continue processing. The reason was php-fpm. All possible buffer flushes did not work, unless I called fastcgi_finish_request(); For example: <?php // redirecting... ignore_user_abort(true); header("Location: ".$redirectUrl, true); header("Connection: close", true); header("Content-Length: 0", true); ob_end_flush(); flush(); fastcgi_finish_request(); // important when using php-fpm! sleep (5); // User won't feel this sleep because he'll already be away // do some work after user has been redirected ?> ---- Server IP: 69.147.83.199 Probable Submitter: 195.218.191.105 ---- Manual Page -- http://www.php.net/manual/en/features.connection-handling.php Edit -- https://master.php.net/note/edit/110184 Del: integrated -- https://master.php.net/note/delete/110184/integrated Del: useless -- https://master.php.net/note/delete/110184/useless Del: bad code -- https://master.php.net/note/delete/110184/bad+code Del: spam -- https://master.php.net/note/delete/110184/spam Del: non-english -- https://master.php.net/note/delete/110184/non-english Del: in docs -- https://master.php.net/note/delete/110184/in+docs Del: other reasons-- https://master.php.net/note/delete/110184 Reject -- https://master.php.net/note/reject/110184 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#191047) next »