4

I have several sites hosted on the same server, in different directories (e.g: server.com/site_one, server.com/site_two) and I want to store the session files for each site in a different directory.
How do I do that?

Thanks!

0

1 Answer 1

3

If you're running PHP as an Apache2 module, the following should work for you.

In the folder you want to change the session path (e.g site.com/site_one), create a .htaccess file with the following in it:
php_value session.save_path "/path/to/separate/sessions/site_one".

Repeat this and change the directory for each folder you want to have a separate session path.

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.