Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Session Variable in php

Posted on 2006-11-15
4
Medium Priority
?
216 Views
Last Modified: 2007-01-02
I have web pages on a local intranet which are used by different users in the office.  

Some forms require the user to do research then input the data.  If the user waits to long between requests the session variable expires.  I think.  I takes them back to a login.

When would I tell php not time time out the session variable?

In the php.ini file?
0
Comment
Question by:jmsloan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 19

Accepted Solution

by:
VoteyDisciple earned 200 total points
ID: 17950834
You can do it in the php.ini file, or you can call ini_set('session.gc_maxlifetime', 3600);

3600 being 60 seconds * 60 minutes.  You can use any value you want.
0
 
LVL 18

Expert Comment

by:Mark Gilbert
ID: 17954915
Additionally, you can change the session paremeter in your php.ini file.  That would then ensure that it's system wide, and not script specific.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question