Hi,

I am moving to the php internal session system and there are a number of stumbling blocks I want to bring up. Since I am new to the session system (I have read a few articles about it and writtten some code using it) I want to take the opportunity to discuss things here a bit before I submit feature requests :-)

Specifically I am looking at adding my own session handler. The only reason for now to do so is that I want to extend the garbage collection to also delete a few other files that are generated over the coure of a session in my framework.

1) selective handler overwrite
Unfortunately you cannot selectively overwrite the session handler and the defeault callbacks are not exposed to the user as function, so I have to reimplement the entire file handler even if I just want to modify the garbage/destroy callbacks.


2) custom session handler and session_destroy()
The next stumbling block was tricky to find out. The pointer was in the user comments. Appearently if you call session_destroy the user defined session handler is forgotten. Even worse there is no way to get the session handler which means that whatever code section calls session_destroy (in my case PEAR::LiveUser) on logout needs to have the information about what custom session handler (what if any) to use.


Interestingly the user defined session handler is not forgotten entirely as the session handling fails to load from here on forth until I set the session handler again.

So it would be good to either not have the session handler forgotten when calling session_destroy() or if this is not feasible for some reason to have atleast a session_get_save_handler() function to get the handler if one is set so that it can easily be restored.

gruss,
Lukas Smith
[EMAIL PROTECTED]
_______________________________
  BackendMedia
  www.backendmedia.com
  [EMAIL PROTECTED]

  Linn Zwoch Smith GbR
  Pariser Str. 44
  D-10707 Berlin

  Tel +49 30 83 22 50 00
  Fax +49 30 83 22 50 07

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to