Did you look in the manual first?  Didn't think so.

php.net/session
first search result is http://www.php.net/manual/en/ref.session.php

There are two PHP.ini settings you should look at:

"session.gc_probability specifies the probability that the gc (garbage
collection) routine is started on each request in percent. Defaults to 1.

session.gc_maxlifetime specifies the number of seconds after which data will
be seen as 'garbage' and cleaned up."


if you can't change the settings yourself in php.ini (or ask the host to),
then i'm 99% sure they can be over-ridden on a per-directory basis using a
.htaccess file (apache assumption here).

Something like (guess):

<IfModule mod_php4.c>
    php_flag session.gc_maxlifetime 1440
</IfModule>


Of course, all this was available by:

a) searching the manial
b) searching the archives, where this gets asked weekly


:)


Justin French



on 19/02/03 12:59 PM, Monty ([EMAIL PROTECTED]) wrote:

> I'm finding that my sessions seem to be timing out fairly quickly. For
> example, in a little forum I wrote with PHP, people are telling me that if
> they type a long message and click Submit, they are taken to the Login page
> because their session obviously timed out, and they loose their posts in the
> forum. I do have a "remember me" feature that uses a cookie, but, not all
> visitors are using it, and they are the ones experiencing this problem.
> 
> Is there a way to extend session time, and is that the best way to reduce
> this problem from happening to most members?
> 
> Thanks!
> 
> Monty
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to