Is this possible to unset only one variable from other session in case when I know PHPSESSID value
Yes this is possible and you need to know the session id of that session you would like to unset the variable/value from.
can I do it without changing current user session?
If you want to do it with standard PHP functions, it's not possible without switching the session. With third-party libraries you can do that w/o switching the session.
I would like check if session of PHPSESSID still exist, if exist then unset($_SESSION['something'])
of chosen PHPSESSID.
This is pretty similar to an answer to php destroy a session which is not the current session, but only deleting a specific member:
$unsetFromSessionID = ... ; # set your session id from where you want to unset from
$unsetVariableName = 'something'; # set the variable name
$backupSessionID = session_id($unsetFromSessionID);
session_start(); # load session data
unset($_SESSION[$unsetVariableName]);
session_commit(); # save changes to disc
session_id($backupSessionID); # switch to current session
session_start();
If you want to find out if that other session was active or not, this is not possible with this method and from within PHP because PHP will create a new, empty session on session_start()
in case it did not exists.
The alternative is to work with the session store directly, e.g. by looking for the session file on disc, loading it's contents, removing a variable and saving it back. A PHP library that is able to do that is Serialized, it ships with an example of a Session File Viewer which might be a good starting point.
See also: How to tell if a session is active?