i have noticed that in PHP the session is save in the HD under the user temp folder (on winXP at least)!
is this always?or it depends the apache configuration?
and if so why when the sessions end's the session fiels arent deleted???
beacuse its a security matter!
thnaks in advance
peleg
php session's
Moderator: General Moderators
- Buddha443556
- Forum Regular
- Posts: 873
- Joined: Fri Mar 19, 2004 1:51 pm
Re: php session's
You can set a different location using session.save_path directive.pelegk2 wrote:i have noticed that in PHP the session is save in the HD under the user temp folder (on winXP at least)!
/tmp on the HD is the default. As I said above you can change that location usually. You could also use shared memory not available on Windows though.pelegk2 wrote:is this always?or it depends the apache configuration?
Old session are deleted during garbage collection. You may want to play with these configuration options session.gc_probability, session.gc_divisor and session.gc_maxlifetime.pelegk2 wrote:and if so why when the sessions end's the session fiels arent deleted???
beacuse its a security matter!
One more thing:
THE MANUAL wrote:Note: If you are using the default file-based session handler, your filesystem must keep track of access times (atime). Windows FAT does not so you will have to come up with another way to handle garbage collecting your session if you are stuck with a FAT filesystem or any other fs where atime tracking is not available. Since PHP 4.2.3 it has used mtime (modified date) instead of atime. So, you won't have problems with filesystems where atime tracking is not available.
- pelegk2
- Forum Regular
- Posts: 633
- Joined: Thu Nov 27, 2003 5:02 am
- Location: Israel - the best place to live in after heaven
- Contact:
what i meant :
u wrote :
what i meant was if or how can i make php not to use files for session but only the memory?As I said above you can change that location usually. You could also use shared memory not available on Windows though.
- Buddha443556
- Forum Regular
- Posts: 873
- Joined: Fri Mar 19, 2004 1:51 pm
OSSP mm by Ralf S. Engelschall.
Might look at Class: shmem.
THE README from mm wrote:OSSP mm is a 2-layer abstraction library which simplifies the usage of shared memory between forked (and this way strongly related) processes under Unix platforms. On the first (lower) layer it hides all platform dependent implementation details (allocation and locking) when dealing with shared memory segments and on the second (higher) layer it provides a high-level malloc(3)-style API for a convenient and well known way to work with data-structures inside those shared memory segments.
This library was successfully tested on FreeBSD, OpenBSD, NetBSD, BSDI, Linux, SunOS, Solaris, Tru64, AIX, A/UX, HP-UX, ReliantUNIX, IRIX, UnixWare and even Win32 Cygwin, BeOS and OS/390.
You might try writing a custom session handler using shmop might work on XP.THE MANUAL- shmop wrote:Note: Versions of Windows previous to Windows 2000 do not support shared memory. Under Windows, Shmop will only work when PHP is running as a web server module, such as Apache or IIS (CLI and CGI will not work).
Might look at Class: shmem.