note 87392 added to ref.session

From: Date: Wed, 03 Dec 2008 10:51:52 +0000
Subject: note 87392 added to ref.session
Groups: php.notes 
Request: Send a blank email to php-notes+get-147582@lists.php.net to get a copy of this message
For UNIX : One might encounter some problems with sessions, having different sites on the same server : sessions would either merge if one is using more than one site at a time or crash if sites are owned by different system users. For instance : www.site1.com is stored in /home/site1/www www.site2.com is stored in /home/site2/www Using both www.site1.com and www.site2.com would cause sessions to act weird. If you're using PHP as an Apache module, you can easely use php_value in the http.conf to set a unique session.name depending on the site. If you're using suPHP though (PHP as CGI) you can't use php_value, though you can use suPHP_ConfigPath. Here's an example : <VirtualHost 10.10.10.10:8081> DocumentRoot /home/site1/www ServerName www.site1.com suPHP_ConfigPath /home/site1/server_config </VirtualHost> <VirtualHost 10.10.10.10:8082> DocumentRoot /home/site2/www ServerName www.site2.com suPHP_ConfigPath /home/site2/server_config </VirtualHost> Each server_config folder contain a php.ini file specific to the vHost. You then just have to change the values of each session.name to unique ones and you're done ! ---- Server IP: 89.31.146.176 Probable Submitter: 83.201.5.195 ---- Manual Page -- http://www.php.net/manual/en/ref.session.php Edit -- https://master.php.net/note/edit/87392 Del: integrated -- https://master.php.net/note/delete/87392/integrated Del: useless -- https://master.php.net/note/delete/87392/useless Del: bad code -- https://master.php.net/note/delete/87392/bad+code Del: spam -- https://master.php.net/note/delete/87392/spam Del: non-english -- https://master.php.net/note/delete/87392/non-english Del: in docs -- https://master.php.net/note/delete/87392/in+docs Del: other reasons-- https://master.php.net/note/delete/87392 Reject -- https://master.php.net/note/reject/87392 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#147582) next »