• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

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