note 30078 deleted from ref.session by didou
| From: | didou@php.net | Date: | Mon, 07 Jul 2003 15:00:32 +0000 |
| Subject: | note 30078 deleted from ref.session by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-51634@lists.php.net to get a copy of this message | ||
Note Submitter: Dan
----
Sessions expire randomly? Running many related sites, which people may view at the same time? Make
sure you use a different directory for the session save path of each virtual host (by default, the
session files will go into /tmp, so create sub directories there, such as sess_dir1 and set
permissions correctly)! Put a .htaccess file in the root of each site, and include 'php_value
session.save_path /tmp/sess_dir1' in that file.
I had two sites (company.com and x.company.com) which shared the /tmp folder for sessions, and
typically both sites would be open at the same time. Somehow the sessions were shared - not sure why
but using different folders for the save_path solved the problem. This is a good idea anyway if you
host many sites, but these were both company sites on a single server.