Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP Session Length

Status
Not open for further replies.

ConBran

Technical User
Jan 4, 2005
29
GB
Hi all,

Dont know if this is the correct place to post this question, but here goes anyway.

I have been asked to check the session length of a system that I know basically nothing about - it was designed by someone who is no longer with the company and their documentation is ropey at best.

All I really need to know is where to find the setting for how long a session is. Is this easy enough to find and change?

Any and all suggestions on how to find it, and change it, are more than welcome.


Cheers
ConBran
 
Hi there,

As far as I'm aware, session length can be viewed in several ways. There is a php.ini parameter called session.cache_expire, which is the time cached session pages will live. It is set to 180 minutes by default. But if cookies are being used to store the session ID, there will be an associated expiry with them as well.

If the author has written a custom session control function... who knows? Finally, this all assumes that you're using the built in PHP 4 + session handling not something like PHPLib.

Hope that helps in some way.

Mark.
 
Check out:
1. Output of phpinfo(): Look at the standard settings for sessions (easy to find).
2. If on LAMP grep for ini_set in all the files - observe any settings related to session
3. Also grep for session_set

That should expose all settings, manually or predefined.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top