php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16194 register_shutdown_function
Submitted: 2002-03-20 18:39 UTC Modified: 2002-03-21 05:14 UTC
From: nizzt at zerospace dot org Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.1.2 OS: Redhat Linux 7.2
Private report: No CVE-ID: None
 [2002-03-20 18:39 UTC] nizzt at zerospace dot org
register_shutdown_function doesn't close the connection to the browser when called on RedHat 7.2 Linux PHP 4.1.2.

Example:

<?php

function test() {
    echo "In test connection_status: " . connection_status() . "<BR>\n";
}

register_shutdown_function("test");
echo "In script connection_status: " . connection_status() . "<BR>\n";
?>
END<BR>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-21 05:12 UTC] hholzgra@php.net
the connection is closed by either the webserver or the client software, not by php

you can use connection_status() to detect the cause for
the script termination

if you still have a connection then your script terminated normaly, if you don't then the client terminated the connection (or the net infrastructure droped it) 

see also: http://php.net/ignore_user_abort
 [2002-03-21 05:14 UTC] hholzgra@php.net
once again forgot to change the status ...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 18 23:01:26 2024 UTC