Forum Moderators: coopster

Message Too Old, No Replies

Delete empty sessions?

         

dbzfyam

9:09 am on Nov 4, 2008 (gmt 0)

10+ Year Member



Does anyone know how I can delete empty sessions? I tried looping through the sessions folder and checking the size (if 0, then remove the file), but I get the error below when using filesize().

Warning: filesize() [function.filesize]: stat failed for sess_7f2c21530bc0747f882b0f82f407b6ee in /www/htdocs/maxuser/http/athena/index.php on line 5

Thanks in advance,
Stefan

jatar_k

4:15 pm on Nov 4, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



why don't you just let the server clean them up?

dbzfyam

6:50 pm on Nov 4, 2008 (gmt 0)

10+ Year Member



I need the users to stay logged in for 6 months (or longer) and PHP is set to clean up the sessions every 30 minutes. I'm building a custom project management system (for internal use) so my coworkers don't want to log in every 30 minutes/every day.

I currently use session_save_path and a high value for session_set_cookie_params to keep them logged in. Is there a other way to do this?

jatar_k

6:54 pm on Nov 4, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



couldn't you just use a cookie?