chrometweaks.org

Whats better yahoo web host or iPage?

Click Here To View All Answers...


My first question is Whats better yahoo web host or iPage? Thanks in advance for any answer or 2. My 2nd question... I have changed application_top.php with the following code:.

// set the session cookie parameters.

If (function_exists('session_set_cookie_params')) {.

Session_set_cookie_params(2592000, $cookie_path, $cookie_domain);.

} elseif (function_exists('ini_set')) {.

Ini_set('session.cookie_lifetime', '2592000');.

Ini_set('session.cookie_path', $cookie_path);.

Ini_set('session.cookie_domain', $cookie_domain);.

}.

I have changed the cookie lifetime parameters to be 2592000 which in theory should keep a customer logged in for 30 days because the cookie is valid for that long..

I ran some tests and it seems to be working fine... I can log in, close the web browser, reopen the web browser ad I am still logged in..

However if I go away from my comp for a period of time and come back, I open the web browser and I am not logged in. It has logged me out..

Any ideas why?.

Shouldn't the cookie keep the session alive?..

Comments (58)

Good question... I dunno what is the answer to your question. I'll do some poking around and get back to you if I find an answer. You should email the people at iPage as they probably could give you an answer..

Comment #1

I think you can also do this.

# Overload PHP variables:.

<IfModule mod_php4.c>.

Php_value session.gc_maxlifetime 2592000.

</IfModule>.

In your .htaccess file.

This post has been edited by.

Tomhole.

: 07 April 2004, 15:09..

Comment #2

As long as it works!!!! I have been trying to figure this our for long... I thought I needed the AUTOLOGON contribution.... but the thing doesn't work..

This is much easier!..

Comment #3

Did any of the things mentioned above end up working out?..

Comment #4

Just wanting to bring the topic up again. I am curious did anyone find a way that has worked to increase the cookie life?.

Thanks..

Comment #5

I have changed application_top.php with the following code:.

// set the session cookie parameters.

If (function_exists('session_set_cookie_params')) {.

Session_set_cookie_params(2592000, $cookie_path, $cookie_domain);.

} elseif (function_exists('ini_set')) {.

Ini_set('session.cookie_lifetime', '2592000');.

Ini_set('session.cookie_path', $cookie_path);.

Ini_set('session.cookie_domain', $cookie_domain);.

}.

I have changed the cookie lifetime parameters to be 2592000 which in theory should keep a customer logged in for 30 days because the cookie is valid for that long..

I ran some tests and it seems to be working fine... I can log in, close the web browser, reopen the web browser ad I am still logged in..

However if I go away from my comp for a period of time and come back, I open the web browser and I am not logged in. It has logged me out..

Any ideas why?.

Shouldn't the cookie keep the session alive?..

Comment #6

OK I have had a closer look and in the functions/sessions.php it has the following lines at the beginning:.

If (STORE_SESSIONS == 'mysql') {.

If (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {.

$SESS_LIFE = 0;.

}.

The value for gc_maxlifetime in the php.ini is 1440 and it uses that to store the expiry date of the session..

I do not have access to change my php.ini file on my host so I did the following:.

If (STORE_SESSIONS == 'mysql') {.

// if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {.

// $SESS_LIFE = 0;.

// }.

$SESS_LIFE = 2592000;.

Is that ok? Has anyone else done something similar?.

That SHOULD keep the customers session open for 30 days...

Comment #7


This question was taken from a support group/message board and re-posted here so others can learn from it.