General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 11th, 2003, 04:23 AM
Antiloop Antiloop is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Somewhere over the Rainbow
Posts: 3 Antiloop User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old October 11th, 2003, 02:26 PM
mjlivelyjr mjlivelyjr is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Idaho, US
Posts: 9 mjlivelyjr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #3  
Old October 11th, 2003, 06:16 PM
Antiloop Antiloop is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Somewhere over the Rainbow
Posts: 3 Antiloop User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old October 12th, 2003, 10:40 AM
mjlivelyjr mjlivelyjr is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Idaho, US
Posts: 9 mjlivelyjr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #5  
Old October 13th, 2003, 02:32 AM
Antiloop Antiloop is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Somewhere over the Rainbow
Posts: 3 Antiloop User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank you very much for your help. this has cured alot of headaches

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > session.save_path query


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT