southbeach
Programmer
The problem:
------
Working on script where a link is provided via email. The script looks at URL for content/values and if URL is that of a email the routine is triggered to automatically log in user.
The log in routine is the same routine one would use if you were to fill in the log in form and submit it so, it is fair to say that the same session variables are set - I confirmed this by comparing session dumps obtained using both approaches.
Once logged in, as user navigates through application, scripts check if $_SESSION['usrInfo'] is set - If this is NOT set, then it kills session and routes user back to log in page.
The behavior is triggered if I start navigating the moment the log on process is complete - If I wait a few seconds, it does not kick me out; as if session needs some time to sync in or to be stored.
I am not using a custom session control system - I am using PHP's own by setting $_SESSION variables and checking these variables when/if needed.
I use session_start('SessionName') in the scripts
----
For the life of me - I cannot understand why this is and cannot find a suggested solution to this problem.
Do you have any idea, however improbable of what can be causing this? Any suggestion is and will always be greatly appreciated.
Regards,
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
------
Working on script where a link is provided via email. The script looks at URL for content/values and if URL is that of a email the routine is triggered to automatically log in user.
The log in routine is the same routine one would use if you were to fill in the log in form and submit it so, it is fair to say that the same session variables are set - I confirmed this by comparing session dumps obtained using both approaches.
Once logged in, as user navigates through application, scripts check if $_SESSION['usrInfo'] is set - If this is NOT set, then it kills session and routes user back to log in page.
The behavior is triggered if I start navigating the moment the log on process is complete - If I wait a few seconds, it does not kick me out; as if session needs some time to sync in or to be stored.
I am not using a custom session control system - I am using PHP's own by setting $_SESSION variables and checking these variables when/if needed.
I use session_start('SessionName') in the scripts
----
For the life of me - I cannot understand why this is and cannot find a suggested solution to this problem.
Do you have any idea, however improbable of what can be causing this? Any suggestion is and will always be greatly appreciated.
Regards,
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.