Doc #27555 [Com]: Unable to modify $_SESSION from __destruct()
| From: | jonimane at gmail dot com | Date: | Sat, 07 Jul 2012 01:37:58 +0000 |
| Subject: | Doc #27555 [Com]: Unable to modify $_SESSION from __destruct() | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-8540@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=27555&edit=1
ID: 27555
Comment by: jonimane at gmail dot com
Reported by: jaanus at heeringson dot com
Summary: Unable to modify $_SESSION from __destruct()
Status: No Feedback
Type: Documentation Problem
Package: Documentation problem
Operating System: Linux 2.4.24
PHP Version: 5CVS-2004-03-10 (dev)
Assigned To: helly
Block user comment: N
Private report: N
New Comment:
I have the same problem.
I am trying to set an SESSION variable in a destructor method, but it didnt work.
And what about feedback?
Previous Comments:
------------------------------------------------------------------------
[2010-05-29 23:40:16] acetox94 at gmx dot de
What about destroying the object with unset? This should call the __destruct()-Function before the
session ends..
------------------------------------------------------------------------
[2010-04-03 16:49:42] bjoern at heyser dot ac
I'am also interested in infomation to the issue.
I use php 5.2 an run into the same issues when I write a session wrapper class.
Will the "(unwanted) feature" becomes removed or is there any sense for calling
destructors after php modules are shutdown..
A further issue I think is the current working directory that isn't available in destructors as
well as in custom registered shutdown functions.
best regards, björn
(sorry for my english)
------------------------------------------------------------------------
[2009-10-20 19:44:34] gabriel at gabrielharrison dot co dot uk
Hi,
I can not find anything in the documentation about this. Was it added or was the feature changed in
newer versions?
Thanks,
Gabriel
------------------------------------------------------------------------
[2008-03-07 21:54:57] ondraster at gmail dot com
Sorry for my last comment, I had bad PHP version in httpd.conf. I feel ashamed...
------------------------------------------------------------------------
[2008-03-07 21:23:18] ondraster at gmail dot com
This bug (unwanted feature maybe?) is really annoying. For example I want, when __destroy, write to
session last visited address.
This bug (feature) has been submitted in year 2004 and still has no fix or there has not been any
reason why are all modules unloaded before __destroy is called? When running __destroy, script is
still running so there's no reason why this function shouldn't have all resources.
I don't know, why this is classified as Documentation problem, when it is clearly BUG!
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=27555
--
Edit this bug report at https://bugs.php.net/bug.php?id=27555&edit=1