Jump to content

New Sessions Across the Same Domain and Server


berridgeab

Recommended Posts

Hi

 

I operate (example) www.joebloggs.com which is using PHP sessions to handle Logins, etc etc.

 

I also operate a separate site at www.joebloggs.com/NewSite which is entirely seperate from the site at www.joebloggs.com, even though there operating on the same Domain and Server.

 

My problem is, when a user logs out of www.joebloggs.com (Using session_destroy), it also destroys any session information associated with www.joebloggs.com/NewSite.

 

Is there any way to prevent this happening or am I going to have to rethink how I handle my sessions?

 

Scouring the internet (Ive quoted below) I think somebody mentioned using session_name() but I fail to see how it would be implemented?

 

To avoid problems with sessions you should use the session_name('myapplication') [ session_name({UNIQUE_APP_ID}) ].

 

The problem you are mentioning can occur in more simple situations where there is an administration panel and a sign-in form for the users of the web site.

 

If session_name is not used a signed-in user could have access to the admin. panel but this depends on the auth. scheme and mechanism you have implemented.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.