Skip to content
Advertisement

Session variables are not persisting between page loads

Can someone tell me why the session vars are not passing between pages? They were working up to 2 days ago. Now its not? There is a third party system that logs users in based on the third party system. I direct users to the login page with the return url. The third party system logs a user in and passes their id and a token generated on their end and returns them to my site with the id and the token in the url.

If sessions are not set i try and grab the id and the token from the url and set the sessions. (working) I then generate my own token to validate against the token passed from the third party system (working) when i go to click to another page the sessions i set are not empty (????)

Here is my code:

JavaScript

ok this is messed up. It has to be a problem on the hosting providers PHP setup i think because i created two pages. one called info with this code:

JavaScript

and one called info2 with this code:

JavaScript

info created and printed the session ok. when i click the link to go to info2 the sessions dont print. Is this a hosting config problem?

Advertisement

Answer

The answer to this is it was a hosting configuration error. Hosting company changed something and it has worked ever since.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement