Languages :: PHP :: php same session from the same browser |
|||
| By: Nono |
Date: 14/06/2007 14:10:55 |
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 | 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 |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








