0

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 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.