I tried to debug this problem for hours, but could not. I have two files:
My first file is:
session_start(); $_SESSION['user'] = '1';
My second file:
session_start(); print_r($_SESSION); echo $_SESSION['user'];
But the second file repeats the empty array. This works fine on my local host, but doesn't work on the online server. I also have "register_globals" disabled in php.ini
If you use the goto cPanel cPanel> php.ini QuickConfig>
cPanel
php.ini QuickConfig
Verify
session.save_handler = files session.save_path = /tmp
If you're still having a problem, ask your cPanel guys for help.
i also ran into the same problem with ipage hosting, now it is solved using Radhakrishna Chowdary, I did the following -
iPage , session_save_path() script. :
session_save_path()
session_save_path("your home directory path"/cgi-bin/tmp); session_start();
iPage Knowledgebase .
, $_SESSION ['user'], $_SESSION ['userr'] , php 5.3 ipage
'session.save_path' , , , , , , ipage, cPanel.
, iPage , php .
IPage:
, "session.save_path" "php.ini", , .
session_save_path('/home/your/home/directory/path/cgi-bin/tmp');