Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Session Variable in php

Posted on 2006-11-15
4
Medium Priority
?
218 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
2 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

783 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