visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Languages :: PHP :: php same session from the same browser


By: Nono Great Britain  Date: 14/06/2007 14:10:55  English  Points: 20 Status: Answered
Quality : Excellent
I've a problem of php using the same session if accessing websites from the same browser ?!
By: VGR Date: 14/06/2007 14:45:27 English  Type : Answer
it's normal. If the two (or more) URIs share the same domain name [or resolve to the same webserver's DNS name] then the session will be the same, ***except*** that you ***may*** be careful and specify different sessions ;-)

Just add a session_name() (see documentation) on top of each page that does a session_start(), and use a different session name for each website.

You may also use different browser sessions for the different websites, this requires no modifications on the webserver. Just use multiple Firefox INSTANCES (processes=executable launch, not "new tab"s or "new window"s from the SAME INSTANCE!) or use really different browsers.

You may circumvent this issue if you've only one, two or three websites in local and you want to access them all with the same browser session. In this case, using http://localhost/ [= http://127.0.0.1/ ] and http://externalipaddress/ or http://yourrouteraddress/ may do the trick.

regards

Do register to be able to answer

EContact
browser fav
page generated in 262.557980 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page