meltingpoint Posted February 4, 2010 Share Posted February 4, 2010 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??? Quote Link to comment https://forums.phpfreaks.com/topic/190870-_session-variables-lost-untill-refresh-page/ Share on other sites More sharing options...
PFMaBiSmAd Posted February 4, 2010 Share Posted February 4, 2010 Browser's (all of them) DO NOT pass session id cookies back and forth between http and https protocols due to the security breach this would cause. Quote Link to comment https://forums.phpfreaks.com/topic/190870-_session-variables-lost-untill-refresh-page/#findComment-1006532 Share on other sites More sharing options...
meltingpoint Posted February 4, 2010 Author Share Posted February 4, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/190870-_session-variables-lost-untill-refresh-page/#findComment-1006534 Share on other sites More sharing options...
PFMaBiSmAd Posted February 4, 2010 Share Posted February 4, 2010 Cookies are also domain specific and cannot be passed between different domains. Quote Link to comment https://forums.phpfreaks.com/topic/190870-_session-variables-lost-untill-refresh-page/#findComment-1006732 Share on other sites More sharing options...
meltingpoint Posted February 4, 2010 Author Share Posted February 4, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/190870-_session-variables-lost-untill-refresh-page/#findComment-1006806 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.