Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rename PHPSESSID?

Tags:

php

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

like image 270
Alec Smart Avatar asked Jun 08 '09 10:06

Alec Smart


People also ask

What does Phpsessid mean?

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. (

How do I change a session name?

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.

What is the purpose of Phpsessid cookie?

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.

Where is Phpsessid stored?

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.


1 Answers

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.

like image 106
PatrikAkerstrand Avatar answered Sep 20 '22 21:09

PatrikAkerstrand