Session data works on the local, but not on the ipage server

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

+5
source share
5 answers

If you use the goto cPanel 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.

+7
source

i also ran into the same problem with ipage hosting, now it is solved using Radhakrishna Chowdary, I did the following -

  • ipage
  • β†’ CGI .
  • PHP ing
  • " php.ini PHP 5.3", .
  • session.save_path `/tmp
  • :)
+6

iPage , session_save_path() script. :

session_save_path("your home directory path"/cgi-bin/tmp);
session_start();

iPage Knowledgebase .

+3

, $_SESSION ['user'], $_SESSION ['userr'] , php 5.3 ipage

0

'session.save_path' , , , , , , ipage, cPanel.

, iPage , php .


IPage:

, "session.save_path" "php.ini", , .

enter image description here

session_save_path('/home/your/home/directory/path/cgi-bin/tmp');
0

All Articles