php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46489 exit() not exit
Submitted: 2008-11-05 01:57 UTC Modified: 2008-11-06 01:16 UTC
From: bugs-php at suyama dot info Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.2.6 OS: RHEL4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bugs-php at suyama dot info
New email:
PHP Version: OS:

 

 [2008-11-05 01:57 UTC] bugs-php at suyama dot info
Description:
------------
Then writing session and closing session (include session_write_close function), processing is continued without finishing the exit() call back.
A funnier problem occurs when I use this problem with an exception. 
When at first I carry out session_write_close() calling exit, an exception object becomes null by the later exception handling of an exception.

Reproduce code:
---------------
<?php

session_set_save_handler('dummy', 'dummy', 'dummy','write', 'dummy', 'dummy');

function dummy(){}

function write() {
       print "Write.\n";
       exit;
       print "Not come to here.\n";
}

session_start();

session_write_close();

print "I'm here.\n";


Expected result:
----------------
Write.


Actual result:
--------------
Write.
I'm here.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-06 01:16 UTC] jani@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Sep 08 11:00:01 2025 UTC