Chris Smith wrote:
> Patric wrote:
>> Hi all,
>>
>> Hope somebody can help me out here :)
>>
>> I have noticed that the PHP sessions ($_SESSION variables) do not seem 
>> to expire, nor are the session files cleared, when running suPHP.
> 
> What O/S are you using?
> 
> If it's debian, then debian has a cron job to clean up old sessions 
> rather than it being handled by php itself and changing the 
> session.save_path means it won't look in the new location.
> 
> If it's not I'm stumped :)
> 

Hi Chris, thanks for the response.
It is Red Hat Enterprise Linux ES release 4 (Nahant Update 6)

I managed to come right to some degree here. What I ended up doing was 
set the following in my php.ini:

session.gc_probability = 100
session.gc_divisor     = 100

Which will make the garbage collector clean out expired sessions every 
time there is a session_start() called.

As I said it works to some degree. What happens now is that you create 
your session, then wait for the alloted timeout time to pass. You then 
refresh your page, and you see that the session is still registered, and 
holds the session information. But if after that first refresh you go 
and view the content of the session save path, the files have been 
cleared. So when you refresh for a second time the session is then gone 
as expected. I think this occurs because the garbage collector only 
clears the session files AFTER it processes the script. This seems to be 
acceptable for my user though, so we are running with it as is.

If anybody comes up with anything I would still be interested to hear 
though.

Thanks for your time
Patric

-- 

Q: I want to be a sysadmin.  What should I do?

A: Seek professional help.

----------------------------------------------------------------------
Free pop3 email with a spam filter.
http://www.bluebottle.com/tag/5


_______________________________________________
suPHP mailing list
[email protected]
http://lists.marsching.biz/mailman/listinfo/suphp

Reply via email to