Jump to content

$_SESSION variables lost untill refresh page


meltingpoint

Recommended Posts

Scenario:

main domain- register_globals on

add-on domain- SSL -register_globals off

 

If I set a session variable on page1 and then go to page2 -the session variable does not carry over.  If I use the back button and go to page1 and then back to page2 -the session variable now carries over and will go to any subsequent page.  Closing the browser and deleting all temp files/history- the problem repeats itself.

Yes- session_start() is at the top of each page

 

I have tested the most basic of scripts and it happens each time.  Using the same script and testing it on the main domain (with no SSL) -the problem is absent.  The session variables carry over with out a single problem.

 

There is no code posted as it is a very basic problem.  I am of the belief that it is server problem associated with the installation of the SSL as this problem did not exist until the SSL was installed.

 

Has anyone run across this before??? :shrug:

Link to comment
Share on other sites

Ok.........but the domain that is the problem has the SSL.  I am not passing $_SESSION variables between an SSL site and a non-SSL site.  The $_SESSION variables are initiated on and stay within the SSL Site.

 

So your saying the browser is http and the site (server) is https and therefore the $_SESSION variables will not work?

Link to comment
Share on other sites

Cookies are also domain specific and cannot be passed between different domains.

 

I am not trying to take $_SESSION variables BETWEEN domains.  I am trying to have $_SESSION variables work on a single domain (the one with the SSL) and they are not working.

 

To be clear- $_SESSION variables are not working on my one domain with SSL. 

 

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.