The code works fine on localhost but not on live server. There is no error, it can read and write to DB
The different is in data saved to DB
On localhost, saved data look like this: SITE_LANG|s:2:"en";ClientID|s:2:"26";ClientGroupID|s:1:"1";
On live server, saved data look like this: Np5e14FWKDVHzaaG-ZF_ynpH30c343pkf4b3w-fAOKJb6u9NZQtN8vTnBXxO3FtcKfQQE7JKq ...
The live server is dedicated server and we have other websites used session and all are working fine. Please help :)
I found solution to this issue, just add this to .htaccess file:
php_flag "suhosin.session.encrypt" 0
php_flag "suhosin.cookie.encrypt" 0