0
votes

I am using memcache for my php session storing. I have configured memcache in my server and changed the session path also. I can't get the session value from file1.php to file2.php But the session id showed in these two files are same.

file1.php :

session_start();$_SESSION['server_test_ip'] = 'IP';$_SESSION['server_test_value'] = 'Test session';echo session_id();echo '<pre>';print_r($_SESSION);

file2.php :

session_start();echo session_id();$_SESSION['test'] = 'test from test file';echo '<pre>';print_r($_SESSION);
1

1 Answers

1
votes

Code is correct, you should look into your session.* and memcached.* ini settings.

Also session.save_handler and session.save_path must be firstly set. Docs