note 30078 added to ref.session

From: Date: Wed, 05 Mar 2003 21:47:50 +0000
Subject: note 30078 added to ref.session
Groups: php.notes 
Request: Send a blank email to php-notes+get-44901@lists.php.net to get a copy of this message
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. -- http://www.php.net/manual/en/ref.session.php http://master.php.net/manage/user-notes.php?action=edit+30078 http://master.php.net/manage/user-notes.php?action=delete+30078 http://master.php.net/manage/user-notes.php?action=reject+30078

« previous php.notes (#44901) next »