php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30992 Severe misbehavior of script-based class destructors
Submitted: 2004-12-06 06:11 UTC Modified: 2005-03-08 01:00 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:1 (25.0%)
From: anthony at ectrolinux dot com Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 5.0.2 OS: Gentoo Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: anthony at ectrolinux dot com
New email:
PHP Version: OS:

 

 [2004-12-06 06:11 UTC] anthony at ectrolinux dot com
Description:
------------
Some of the effects of this bug are outlined in the two bugs that are referenced at the end of this bug report. As neither of those bugs outline the actual, underlying cause of the problem, this bug shall do so.

When working with script-based classes or derivations of built-in PHP classes, PHP prematurely executes the procedures that would be expected during script termination, before script termination actually occurs. As a result of this, before the destructors are called, output buffering is explicitly terminated, sessions are closed and other pieces of functionality that are integral to proper script execution are not available to properly shutdown the script.

Script developers may work-around the bug by explicitly unsetting the class objects before they would normally go out of scope at the end of the script, however this method can easily be haphazardly implemented if there are lingering object references in other sections of the code.

Reproduce code:
---------------
See bugs:
    - #29032
    - #30578


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-28 21:18 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-03-08 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 19:01:32 2024 UTC