Re: Session's is slowing the page ??

From: Date: Tue, 28 May 2002 04:09:23 +0000
Subject: Re: Session's is slowing the page ??
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-99428@lists.php.net to get a copy of this message
Hello J, I try to change the gc probability in the .htaccess (php_value session.gc_probability = 10) but it didnt work :-( Is there any other ideas ? maybe it a bug in PHP ? THANKS, Dima. "J Smith" <dark_panda@hushmail.com> wrote in message news:20020527164641.53248.qmail@pb1.pair.com... > > It might have something to do with the way the session extension in PHP > performs garbage collection. There's a setting in php.ini that basically > controls how often garbage collection is performed. The value is a > percentage, and determines how often the GC should be done over a random > number of session_start() requests. > > If GC is invoked, the garbage collector will start to delete all of the > expired session files in your session directory. If there's a lot of them, > it might take longer to load the page that the garbage collection was > started on. Since the garbage collector is called at random based on the > aforementioned setting, not every page will be affected. > > The problem could probably be cut down by increasing the value of the GC > setting, as fewer files would need to be deleted with each GC sweep, as > more GC sweeps will be called overall. > > That's just a guess, though. > > J > > > Dima Dubin wrote: > > > Hello, > > I have very wierd problem : > > I use session to manage users and I have this structure of the page : > > ----- > > include("db.php"); > > include("header.php"); > > bla bla > > include("footer.php"); > > ----- > > > > in the db.php I have : > > > > ---- > > session_start(); > > #some mysql connect stuff > > ---- > > > > I use session with the $_SESSION array (cheking if > > registered[isset($_S...)] and registering...) > > and all work fine.... > > but sometimes the page loading is very very very slow (and its a really > > really fast host) and when I removing session_start(); from the top of the > > page, the page load normaly. > > > > the PHP version is 4.1.1, someone have an idea ? > > thanks in advance, > > Dima. >

« previous php.general (#99428) next »