Wondering how I can change the php session id from PHPSESSID to something else so that it does not interfere with other PHP scripts running on the same domain. Is this possible?
Thank you for your time
PHPSESSID – The PHPSESSID cookie is native to PHP and enables websites to store serialised state data. It is used to establish a user session and to pass state data via a temporary cookie, which is commonly referred to as a session cookie. (
Changing session name You can update the session name by calling session_name() . //Set the session name session_name('newname'); //Start the session session_start(); If no argument is provided into session_name() then the current session name is returned.
It's the identifier for your current session in PHP. If you delete it, you won't be able to access/make use of session variables.
PHP Default Session Storage (File System): In PHP, by default session data is stored in files on the server. Each file is named after a cookie that is stored on the client computer. This session cookie (PHPSESSID) presumably survives on the client side until all windows of the browser are closed.
See this link for PHP runtime configuration. The variable you are looking for is session.name. You can also alter this programmatically by calling session_name before any call to session_start or session_register.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With