PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.general > Deleting session file from server
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Deleting session file from server

Réponse
 
LinkBack Outils de la discussion
Vieux 21/02/2008, 13h50   #1
ajdona@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Deleting session file from server

Hi

From what I understand, a session is deleted after the browser window
is closed. I have been trying to work out why the session file remains
on the server (it is named something like sess_3ghy6...) and has to be
manually deleted. I want to avoid having hundreds of these files
collecting on the server and would appreciate any advice on why they
aren't automatically deleting when the browser closes.

Here is part of my php info file if that s.

session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session._domain no value no value
session._lifetime 0 0
session._path / /
session._secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path .\ .\
session.serialize_handler php php
session.use_ On On
session.use_only_ Off Off
session.use_trans_sid Off Off

Thanks
Andrew
  Réponse avec citation
Vieux 21/02/2008, 14h27   #2
larry@portcommodore.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Deleting session file from server

On Feb 21, 5:50 am, ajd...@gmail.com wrote:
> Hi
>
> From what I understand, a session is deleted after the browser window
> is closed. I have been trying to work out why the session file remains
> on the server (it is named something like sess_3ghy6...) and has to be
> manually deleted. I want to avoid having hundreds of these files
> collecting on the server and would appreciate any advice on why they
> aren't automatically deleting when the browser closes.
>
> Here is part of my php info file if that s.
>
> session.auto_start Off Off
> session.bug_compat_42 On On
> session.bug_compat_warn On On
> session.cache_expire 180 180
> session.cache_limiter nocache nocache
> session._domain no value no value
> session._lifetime 0 0
> session._path / /
> session._secure Off Off
> session.entropy_file no value no value
> session.entropy_length 0 0
> session.gc_divisor 100 100
> session.gc_maxlifetime 1440 1440
> session.gc_probability 1 1
> session.name PHPSESSID PHPSESSID
> session.referer_check no value no value
> session.save_handler files files
> session.save_path .\ .\
> session.serialize_handler php php
> session.use_ On On
> session.use_only_ Off Off
> session.use_trans_sid Off Off
>
> Thanks
> Andrew


The server doesn't immediately delete session files, it does so during
a garbage collection cycle. One thing you can do if you are concerned
about space and you do have your users log out, is during log out is
either use session_destroy(); or empty the session array ($_SESSION =
array()

Check out this page and look for garbage collect to learn more:
http://www.oreilly.com/catalog/webdb...pter/ch08.html

Larry
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 10h38.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09989 seconds with 10 queries