Thursday, 1 October 2009

Increase Session Times

One customer has recentlty complained that it some cases they do not get long enough to complete an order. This is down to the default settings, what needs to be done is the session time needs to be increased. to this you can either increase the session time out in the session call itself -

ini_set('session.gc_maxlifetime', '28800');

or a better way would be to include it in your php.ini file .

session.gc_maxlifetime = 1440

Note: session.gc_maxlifetime timescale is 3600 = 1 hour

If you're on a shared server you may think you haven't got access to your php.ini file. But what you need to do is open notepad - write the above line in it and save it as 'php.ini' in your 'public_html' folder. Once saved this will add this line to your php settings.

No comments: