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.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.