Users Pricing

forum

Home Forums Handle php session variable for two instance running on same server – MindStick

Handle php session variable for two instance running on same server

Anonymous User 2793 01 Nov 2014

For example let's say I have an app that uses $_SESSION['user_id']. Now if I have two of these applications running on the same server then they will be sharing this user_id variable which would break things.

The only thing I can think of is to prepend some unique id like this:

$_SESSION['/application1/user_id']

$_SESSION['/application2/user_id']


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md