I have a script for a little chat feature, it uses a single session for everyone. Everything looks weird in this code, but I'm allowed to just edit it not recreate it.
The script tries to open this weird "single session for everyone" using code below:
$name='PREFIX-'.md5(home_url());
session_id($name);
session_name($name);
session_start();
Everything looks fine on localhost (XAMPP, Windows, PHP 7.2.5), but when I tried to use it on shared hosting server (Linux, PHP 7.1.18) the session is saved with various names and I can't read it anymore using same $name
.
I've printed everything in ini_get( 'session.save_path')
with print_r(scandir($dir))
but there is nothing like sess_PREFIX-*
there and the save_path
folder is growing by page refresh 3 files every time.