ID:               27555
 Comment by:       jasper at bryant-greene dot name
 Reported By:      jaanus at heeringson dot com
 Status:           No Feedback
 Bug Type:         Documentation problem
 Operating System: Linux 2.4.24
 PHP Version:      5CVS-2004-03-10 (dev)
 Assigned To:      helly
 New Comment:

This is definitely a bug, and needs to be fixed. As has been mentioned
before, all user-definable methods need to have all resources available
to them, including the session module, mysqli module, etc.

Rather than just saying "the destructor is called too late in the
shutdown process" and leaving it at that, why not fix it?


Previous Comments:
------------------------------------------------------------------------

[2005-07-07 09:12:56] richard dot quadling at bandvulc dot co dot uk

As classes are instatiated by a user, their destructing should be
within the users control OR at least before the script terminates and
module "tidying-up" takes place. I think this is actually a PHP bug.

------------------------------------------------------------------------

[2005-07-07 07:47:35] aristotle at brettia dot com

I have a legitimate reason for wanting __destruct methods to be called
before the session module is finalized.

I have a session wrapper class that uses an internal array to keep
session data separate from $_SESSION until the destruction of the
class.  The class' __destruct method is supposed to copy its internal
array back to $_SESSION so that it can be saved.  This is not possible
with the current order.

------------------------------------------------------------------------

[2004-08-02 01:00:06] phpdoc 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".

------------------------------------------------------------------------

[2004-07-25 21:11:19] [EMAIL PROTECTED]

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



------------------------------------------------------------------------

[2004-07-08 05:17:08] mikey-spam at mookins dot com

I am on Windows 2000, using PHP5 RC3. Having same problems.

I also believe that the modules should be shutdown after __destruct()

I am wondering if this is going to be fixed or is it not being
classified as a bug? [EMAIL PROTECTED] seems to think it's expected
behaviour but I never thought it would be which is why I am here after
googling about it.
__destruct() is a user definable method. All aspects of user programs
should have all the resources available to them from the start of the
script right through to the end.

Refcounting of whatever it was that they suggested is not an option, in
fact, I don't even know what that is.

-Mikey

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/27555

-- 
Edit this bug report at http://bugs.php.net/?id=27555&edit=1

Reply via email to