Re: [PHP-DEV] Re: [PHP-DOC] Re: #3793 [Ana->Opn]: session.gc_maxlifetime

2002-08-19 Thread Yasuo Ohgaki
Rasmus Lerdorf wrote: > On Mon, 19 Aug 2002, Yasuo Ohgaki wrote: > > >>Zeev Suraski wrote: >> >>>I don't think that's the way to do it at all. In theory, it's no >>>problem to track whether changes were made to the session data, and >>>perform the write at the end of the request, only if we tra

RE: [PHP-DEV] Re: [PHP-DOC] Re: #3793 [Ana->Opn]: session.gc_maxlifetime

2002-08-19 Thread Jaime Bozza
>But there are still a lot of cases where not writing the session data at >the end of a request will simplify things quite a bit and also be much >more efficient. I am not too concerned about not writing based on whether >or not data changed, I'd like the user to be able to specify that it >shoul

Re: [PHP-DEV] Re: [PHP-DOC] Re: #3793 [Ana->Opn]: session.gc_maxlifetime

2002-08-19 Thread Rasmus Lerdorf
On Mon, 19 Aug 2002, Yasuo Ohgaki wrote: > Zeev Suraski wrote: > > I don't think that's the way to do it at all. In theory, it's no > > problem to track whether changes were made to the session data, and > > perform the write at the end of the request, only if we tracked a > > change. That's on

Re: [PHP-DEV] Re: [PHP-DOC] Re: #3793 [Ana->Opn]: session.gc_maxlifetime

2002-08-18 Thread Yasuo Ohgaki
Zeev Suraski wrote: > I don't think that's the way to do it at all. In theory, it's no > problem to track whether changes were made to the session data, and > perform the write at the end of the request, only if we tracked a > change. That's only in theory, though, since with the fancy new >

Re: [PHP-DEV] Re: [PHP-DOC] Re: #3793 [Ana->Opn]: session.gc_maxlifetime

2002-08-18 Thread Zeev Suraski
I don't think that's the way to do it at all. In theory, it's no problem to track whether changes were made to the session data, and perform the write at the end of the request, only if we tracked a change. That's only in theory, though, since with the fancy new $_SESSION array, there's no wa

Re: [PHP-DEV] Re: [PHP-DOC] Re: #3793 [Ana->Opn]: session.gc_maxlifetime

2002-08-17 Thread Yasuo Ohgaki
Rasmus Lerdorf wrote: > Well, I wouldn't call that easy. To do it in the session handler you > would need to add a bunch of code to the write handler. It would need to > read the current session data, then compare that to the session data it > was called with, and if different write the new sess

Re: [PHP-DEV] Re: [PHP-DOC] Re: #3793 [Ana->Opn]: session.gc_maxlifetime

2002-08-17 Thread Rasmus Lerdorf
Well, I wouldn't call that easy. To do it in the session handler you would need to add a bunch of code to the write handler. It would need to read the current session data, then compare that to the session data it was called with, and if different write the new session data. You aren't saving m

Re: [PHP-DEV] Re: [PHP-DOC] Re: #3793 [Ana->Opn]: session.gc_maxlifetime

2002-08-17 Thread Yasuo Ohgaki
James E. Flemer wrote: > Would it be difficult to just add a "dirty" flag somewhere, It's easy. Write your own session save handler does this if needed. -- Yasuo Ohgaki -- PHP Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: [PHP-DOC] Re: #3793 [Ana->Opn]: session.gc_maxlifetime does not work

2002-08-17 Thread Zeev Suraski
At 16:54 17/08/2002, James E. Flemer wrote: >Would it be difficult to just add a "dirty" flag somewhere, Not really, because today people can modify the session data by simply changing $_SESSION. We have no way of detecting whether $_SESSION was changed, as it's just a regular variable (for th

Re: [PHP-DEV] Re: [PHP-DOC] Re: #3793 [Ana->Opn]: session.gc_maxlifetime does not work

2002-08-17 Thread Zeev Suraski
Coming to think of it, how about: (a) Always use mtime (b) 'touch' the file in case of session-readonly That would allow users to have the performance benefit of noatime for all of the files on the filesystem, except for the session files. 'touch'ing the file should take about the same time a

Re: [PHP-DEV] Re: [PHP-DOC] Re: #3793 [Ana->Opn]:session.gc_maxlifetime does not work

2002-08-17 Thread Timm Friebe
On Sat, 2002-08-17 at 12:36, Zeev Suraski wrote: > Well, I guess it boils down to whether we want to support this function > (which should be easy, I think), or support filesystems without atime. I > vaguely remember that many filesystems don't have (or are capable of > disabling) atime for pe

[PHP-DEV] Re: [PHP-DOC] Re: #3793 [Ana->Opn]: session.gc_maxlifetime does not work

2002-08-17 Thread Zeev Suraski
Ok, that makes sense. I like the idea of being able to configure whether you want to use mtime or atime, so that non atime-compliant filesystems can still be supported, but we leave the window to support session-readonly in the future. Zeev At 07:37 17/08/2002, Rasmus Lerdorf wrote: >Ok, thi

[PHP-DEV] Re: [PHP-DOC] Re: #3793 [Ana->Opn]: session.gc_maxlifetime does not work

2002-08-17 Thread Zeev Suraski
Well, I guess it boils down to whether we want to support this function (which should be easy, I think), or support filesystems without atime. I vaguely remember that many filesystems don't have (or are capable of disabling) atime for performance reasons, but I could be wrong. But, if that's

[PHP-DEV] Re: [PHP-DOC] Re: #3793 [Ana->Opn]: session.gc_maxlifetime does notwork

2002-08-16 Thread Rasmus Lerdorf
Ok, thinking a bit more about this.. session_readonly() really should be implemented. Imagine a system where you have dynamically generated images/flash/pdf or even just a straight framed site. You use sessions to pass information around between not only pages, but also to the dynamically gener