• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Question Cookie Lifetime does not work as expected

marekp

New Pleskian
For a CakePHP store application I need a cookie lifetime of 365 days. The app runs on a managed vServer with CentOS 7 and Plesk 18.0.30, PHP 7.3 FPM. The webserver is Apache with nginx as a reverse proxy.

It is about the function that one stores articles in the shopping cart as well as in the notepad for a certain time even if the browser is closed.
We have the same CakePHP configuration on another server but it does not work on the server where Plesk is running.
Could there be connections here?

Despite the settings at session.cookie_lifetime the sessions are deleted after exactly one week.
Could it be related to Plesk?

Does anybody here have a tip where I could start

cakephp-php-sessions.png
 
Last edited:
Session cookies are removed when the browser session ends. After that happens, a session cookie that remains active on the server is a security threat, but has no real further use.

What is your specific situation where a browser keeps a session open for 365 days? The server-side is a different aspect. The server-side can maintain a cookie while it won't ever be used again, because the browser has long left that session. So if you don't have a front-end that needs to be continously connected to a site and never closes the session, there is no use to have a long session cookie lifetime.
 
It is about the function that one stores articles in the shopping cart as well as in the notepad for a certain time even if the browser is closed.
We have the same CakePHP configuration on another server but it does not work on the server where Plesk is running.
Could there be connections here?
 
That's most likely not a session cookie you are looking at, but a regular cookie that the software sets. A session cookie only controls the PHP session. The session will always be closed when the last browser instance is closed. But a website cookie that your software sets remains on the browser as long as the website intends it to be there (unless the user has told the browser to delete all cookies upon closing it).
 
That's most likely not a session cookie you are looking at, but a regular cookie that the software sets. A session cookie only controls the PHP session. The session will always be closed when the last browser instance is closed. But a website cookie that your software sets remains on the browser as long as the website intends it to be there (unless the user has told the browser to delete all cookies upon closing it).
ok, i then have to check the App Config . Thanks for your help
 
Back
Top