| | |
How to expire a session
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
Sessions are set automatically by the server on page load, and the default life of a session is 20 minutes. If you are overriding this setting (which is acceptable) and you are setting it to ndays (which is highly unnacteptable) then you are putting an incredibly heavy load on your server memory and will cause a whole load of pain for yourself.
It may help our understanding of your situation if you detail exactly what sessions you are refering to and how they are being assigned.
It may help our understanding of your situation if you detail exactly what sessions you are refering to and how they are being assigned.
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.
Lafinboy Productions
:: Website Design :: Website Development ::
Lafinboy Productions
:: Website Design :: Website Development ::
Have you changed the default session lifetime? How are you setting the sessions?
As stated, server sessions are managed automatically by the server, but some of the defaults can be overridden by code.
As stated, server sessions are managed automatically by the server, but some of the defaults can be overridden by code.
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.
Lafinboy Productions
:: Website Design :: Website Development ::
Lafinboy Productions
:: Website Design :: Website Development ::
I havent messed with any part of my server as i use yahoo server and they dont let me change any thing in it.
If you wana look at my server setting you can find them at http://www.eezs.com/test/test.php
If you wana look at my server setting you can find them at http://www.eezs.com/test/test.php
Well the server settings are all kinda standard, so no problem there. I noticed you are setting a cookie named BX and you have set a life of 5 years on it. Is this what you are referring to?
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.
Lafinboy Productions
:: Website Design :: Website Development ::
Lafinboy Productions
:: Website Design :: Website Development ::
Still have no idea what sessions you are refering to. Can you post a screenshot of the sessions you are talking about? Where are the 'sessions' being stored? If you are physically setting a session variable or persistent cookie then you can delete/expire/unset that session variable based on a time calculation. If the session variable is a server generated session variable then it will expire automatically based on the lifetime setting in the server.
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.
Lafinboy Productions
:: Website Design :: Website Development ::
Lafinboy Productions
:: Website Design :: Website Development ::
There are couple of methods depending on how the sessions are set and how much of the session data you actually want to destroy.
Have a look at using session_destroy, session_unset, unset('$_SESSION['$varname']), or session_write_close. Descriptions and details of their use can be found on php.net.
Have a look at using session_destroy, session_unset, unset('$_SESSION['$varname']), or session_write_close. Descriptions and details of their use can be found on php.net.
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.
Lafinboy Productions
:: Website Design :: Website Development ::
Lafinboy Productions
:: Website Design :: Website Development ::
![]() |
Similar Threads
- Session Variable clashing (ASP.NET)
Other Threads in the PHP Forum
- Previous Thread: php installation
- Next Thread: problem in displaying the content
| Thread Tools | Search this Thread |
ajax apache api array basics beginner binary broken cakephp checkbox class cms code codingproblem combobox cron curl database date display domain dynamic echo email error file files folder form format forms function functions google href htaccess html image include insert interactive ip java javascript joomla js limit link load login mail malfunctioning menu mlm mobile multiple mysql nodes oop outofmemmory paging parse paypal pdf php problem procedure query radio ram random recursion reference remote return script search server sessions sms source space sql syntax system table tutorial unset up-to-date update upload url validation validator variable video web webapplications websitecontactform youtube





