|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
session.save_path query
I was wondering if it were possible to centralise a session save path accross an entire server, which would include the servers sites. ie. URL URL and URL would store all of there session information in the same directory. say for example home/sites/abc.com/tmp if you know what i mean, or must every session file be stored in its sites tmp folder i.e. /home/sites/abcd.com/tmp would only have abc.com's session files? any help would be muchly appreciated
|
|
#2
|
|||
|
|||
|
Are all of these servers using the same php.ini file if so then just set the value in the php.ini file and you should be good to go. This is what I do most of the time on my company's product server. We host up to 30 domains on each of our servers and all servers have one centeralized path for session info.
If you are utilizing multiple instances of PHP (ie. different php.ini files for each domain) then the only thing I could possibly see as being a problem is session cleanup. Could you describe your setup a little bit better? Do you use just one instance of php. Is it a server module? Are you using Apache, IIS? |
|
#3
|
|||
|
|||
|
Hi,
Yes all the servers are on the one server and all have access to the same mysql databases and are running off the one php.ini file. php version 4.3.2 apache 1.3.28 mysql 3.23.49 URL |
|
#4
|
|||
|
|||
|
With that setup you shouldn't have a problem setting a global save_path for all of your domains. Just set the directory in your php.ini file.
In the event that for one or two domains you do want to use a seperate path for sessions, I have found the easiest way to do this is making the change in an .htaccess file. You may want to check my syntax but I believe if you put the following line in an .htaccess file: phpvalue session.save_path '/dir/to/sessions' any page that is accessed in the directory the .htaccess file is in (or subdirectories of that directory) will use the above session. |
|
#5
|
|||
|
|||
|
Thank you very much for your help. this has cured alot of headaches
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > session.save_path query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|