![]() | ![]() | ![]() |
| |||||||
| Forums | Register | Groups | Awards | Arcade | Pets | T-Bucks / T-Store | Invite Your Friends | Blogs | Mark Forums Read |
| Web Design Forums and discussions on webdesign |
Web Design | |||||||||
|
|
|
|
| |||||
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Civilians | Can it be done? I have a site written in PHP with a members section that uses sessions. Fairly ordinary stuff, but the sessions always end up being cleared when I move between subdomains on the site. Some Googling threw up some vague references to cookies, but nothing really conclusive. Has anybody successfully got around this little problem? Ta, Dan |
|
| | #2 (permalink) |
| Civilians | Daniel Ruscoe wrote > Can it be done? > > I have a site written in PHP with a members section that uses sessions. > Fairly ordinary stuff, but the sessions always end up being cleared when > I move between subdomains on the site. > > Some Googling threw up some vague references to cookies, but nothing > really conclusive. > > Has anybody successfully got around this little problem? I had a similar problem that drove me totally bonkers, until I spent a long time using trial and error, Googling to no avail, then eventually sussed it! This might not work for you, but in my case the solution was to start the session at the top level, i.e: http://mysite.com NOT a subdomain like: http://www.mysite.com If I started it at the top, then it would work lower down. However, the converse is not true. When I initiated the session here: http://www.mysite.com The values were not available here: http://mysite.com Can you start your sessions in http://mysite.com/anypage.php? -- Charles Sweeney http://CharlesSweeney.com |
|
| | #3 (permalink) |
| Civilians | Daniel Ruscoe wrote: > Can it be done? > > I have a site written in PHP with a members section that uses sessions. > Fairly ordinary stuff, but the sessions always end up being cleared when > I move between subdomains on the site. > > Some Googling threw up some vague references to cookies, but nothing > really conclusive. > > Has anybody successfully got around this little problem? > > Ta, > > Dan You have to set the domain attribute of the cookie correctly. A domain mysite.com would match hostnames subdomain.mysite.com as well as www.mysite.com -- Brian Wakem Email: http://homepage.ntlworld.com/b.wakem/myemail.png |
|
| | #4 (permalink) |
| Civilians | In article <Xns96DAE40399405mecharlessweeneycom@130.133.1.4 >, Charles Sweeney says... > Daniel Ruscoe wrote > > > Can it be done? > > > > I have a site written in PHP with a members section that uses > sessions. > > Fairly ordinary stuff, but the sessions always end up being cleared > when > > I move between subdomains on the site. > I had a similar problem that drove me totally bonkers, until I spent a > long time using trial and error, Googling to no avail, then eventually > sussed it! > > This might not work for you, but in my case the solution was to start > the session at the top level, i.e: > > http://mysite.com > > NOT a subdomain like: > > http://www.mysite.com > > If I started it at the top, then it would work lower down. That looks like a brilliant idea, but it didn't work for me ![]() Thanks anyway, Charles. I appreciate it! Dan |
|
| | #5 (permalink) |
| Civilians | Daniel Ruscoe wrote > In article <Xns96DAE40399405mecharlessweeneycom@130.133.1.4 >, Charles > Sweeney says... >> Daniel Ruscoe wrote >> >> > Can it be done? >> > >> > I have a site written in PHP with a members section that uses >> sessions. >> > Fairly ordinary stuff, but the sessions always end up being cleared >> when >> > I move between subdomains on the site. > >> I had a similar problem that drove me totally bonkers, until I spent a >> long time using trial and error, Googling to no avail, then eventually >> sussed it! >> >> This might not work for you, but in my case the solution was to start >> the session at the top level, i.e: >> >> http://mysite.com >> >> NOT a subdomain like: >> >> http://www.mysite.com >> >> If I started it at the top, then it would work lower down. > > That looks like a brilliant idea, but it didn't work for me ![]() > > Thanks anyway, Charles. I appreciate it! No problem. I figured it might not suit you, but hopefully give you some pointers. -- Charles Sweeney http://CharlesSweeney.com |
|
![]() |
| Bookmarks |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: Multiple sessions in powerpoint | Troy @ TLC Creative | Microsoft Applications | 2 | 07-29-2005 20:00 |
| Web log analyzer?? counts unique JSESSIONID as sessions ? | chsmith@speakeasy.net | Web Design | 4 | 07-22-2005 16:00 |
| Making Access multithread IE6 sessions. | =?Utf-8?B?UGhpbGlidXN0ZXI=?= | Web Design | 0 | 11-18-2004 13:00 |
| Subdomains, the truth and all that ..... | William Tasso | Web Design | 35 | 06-15-2004 12:47 |
![]() | ![]() | ![]() |