Solved

Session Variable in php

Posted on 2006-11-15
4
213 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 50 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

628 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