NYCPHP Meetup

NYPHP.org

[nycphp-talk] Experts help needed (Sessions)

Joseph Crawford codebowl at gmail.com
Tue Aug 2 18:27:27 EDT 2005


Ok so i figured i would post this here since others may be wondering about 
this too.

I couldnt figure out why when i was using output buffering that in my 
destroy method the session_regenerate_id() function would be complaining 
about the headers already being sent.

After a few days of struggling with this i ran a debug session with zend 
studio and found that even after the page is displayed and output buffering 
is flushed the session class runs one last time, it calls the write method 
which in turn called my init method and when the session was destroyed it 
would call the session_regenerate_id() function and it would complain 
because the page was already sent to the browser.

i guess my question here is do any of you guru's know how i can accomplish 
this? I tried to put the call to my init method into my read method but then 
it complained that i was trying to destroy a non existant session. Where can 
i put these checks that will run with each page load. I tried the 
constructor but that only seemed to run just one time, not once per page, 
just once.

-- 
Joseph Crawford Jr.
Codebowl Solutions, Inc.
1-802-671-2021
codebowl at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20050802/ae0e91a6/attachment.html>


More information about the talk mailing list