• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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