close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Length of Session Time out

Thread began 2/20/2019 11:38 pm by Lee Firth | Last modified 2/21/2019 9:30 pm by Ray Borduin | 61 views | 6 replies |

Lee Firth

Length of Session Time out

How do you greatly increase the length of time before you have to log in again? My client logs in to his website, might go away for an hour or two and then comes back and has to log on again. Ideally I would like a 4 hour session time at least.

Sign in to reply to this post

Ray BorduinWebAssist

It is not done on the page with php. You have to updated it in the php.ini file. session.gc_maxlifetime in php.ini is set to 24 minutes (1440 seconds) by default. You can set it to anything you want, but may need to talk to your hosting company to find out where and how they allow updates to php.ini.... it may not be possible on some shared hosting platforms.

Sign in to reply to this post

Lee Firth

Thats the problem, this is shared hosting and I don't have access to the php.ini file, is there another way?

Sign in to reply to this post

Ray BorduinWebAssist

You can ask your hosting provider if they provide a way, but it can't be done from the php code directly. Sometimes they provide a way to update it from the .htaccess file or have a place in your hosting admin where it can be changed, but it may not be possible on shared hosting environments.

Sign in to reply to this post

Lee Firth

I have changed this bu adding the following line to my htaccess file:
php_value session.gc_maxlifetime 18000
I can confirm that the new value is in effect by looking at phpinfo() but it still times out after a short period of time, is there something I am missing?

Sign in to reply to this post

Ray BorduinWebAssist

You may have to update the session.save_path value as well. Sessions are stored as files in a folder specified by that path. If another shared site on that server goes through and clears out sessions that are more than 24 minutes old, it may remove yours as well. A unique save_path could be the solution.

It's always best to use a session.save_path in the directory owned by your user outside of the webroot that has full read/write/execute permissions (777).

Finally, don't forget that you need to set the session.cookie_lifetime to be greater than, or at least equal to, your session.gc_maxlifetime directive.

Sign in to reply to this post

Lee Firth

session.cookie_lifetime is set to 0 which I believe means there is no limit.

I'll try setting a different session.save_path value.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...