For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > October 2005 > RE: [PHP-DB] Re: My $_SESSION['''] variables are expiring!









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [PHP-DB] Re: My $_SESSION['''] variables are expiring!
Ron Piggott

2005-10-29, 6:59 pm

The tech support which hosts my web site e-mailed me that the php.ini
file has $_SESSION[''] variables set for 19 minutes. It is a server
wide variable which they do not want to change their system setting for.

Do any of you know if there is a setting that may be modified for just
my web site?

My other approach is this: Is there a way through a PHP command that I
myself may clear the $_SESSION[''] variables and then re-instate them
immediately after clearing them so my web site hosting command will not
come into effect until it is truly needed?

The way I have this set up is that index.php keeps on being called with
a syntax such as
index.php?request=function

Therefore I could cancel the $_SESSION[''] variables each time index.php
is accessed and then immediately re-create it ...

There is only one variable I am carrying in there and it is the account
which is logged in. I could easily put it to another variable such as
$account = $_SESSION['active_account'];
#insert command to close session variable
#now we are going to start a new session
$_SESSION['active_account'] = $account;

Is there any way of doing this?

Ron



On Sat, 2005-29-10 at 12:02 -0400, Bastien Koert wrote:
> Just a thought, maybe when you are checking for the session object that the
> ! (not) operator is missed
>
> if (isset($_SESSION) { $_SESSION['some_var'] = 0; }
>
> where it should be
>
> if (!isset($_SESSION) { $_SESSION['some_var'] = 0; }
>
> B
>
>
>
>
>

--

ron.piggott@actsministries.org
www.actsministrieschristianevangelism.org

Acts Ministries Christian Evangelism
"Where People Matter"
12 Burton Street
Belleville, Ontario, Canada
K8P 1E6

In Belleville Phone: (613) 967-0032
In North America Call Toll Free: (866) ACTS-MIN
graeme_foster

2005-10-29, 9:55 pm

I think that you want to use ini_set() along with session.gc_maxlifetime.

graeme.

Ron Piggott wrote:
[color=darkred]
>The tech support which hosts my web site e-mailed me that the php.ini
>file has $_SESSION[''] variables set for 19 minutes. It is a server
>wide variable which they do not want to change their system setting for.
>
>Do any of you know if there is a setting that may be modified for just
>my web site?
>
>My other approach is this: Is there a way through a PHP command that I
>myself may clear the $_SESSION[''] variables and then re-instate them
>immediately after clearing them so my web site hosting command will not
>come into effect until it is truly needed?
>
>The way I have this set up is that index.php keeps on being called with
>a syntax such as
>index.php?request=function
>
>Therefore I could cancel the $_SESSION[''] variables each time index.php
>is accessed and then immediately re-create it ...
>
>There is only one variable I am carrying in there and it is the account
>which is logged in. I could easily put it to another variable such as
>$account = $_SESSION['active_account'];
>#insert command to close session variable
>#now we are going to start a new session
>$_SESSION['active_account'] = $account;
>
>Is there any way of doing this?
>
>Ron
>
>
>
>On Sat, 2005-29-10 at 12:02 -0400, Bastien Koert wrote:
>
>
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com