PDA

View Full Version : Resolved Sessions Aren't Working Correctly....Any Ideas?



tedteeter
08-12-2013, 03:03 AM
Greetings, August 11th 2013

Last evening I began consolidating the components of my site and while the "Login Script" has always worked fine as it utilizes "Sessions" I routed it into an iframe on my main page and the script allows account login fine, however, it doesn't permit login protected pages to be loaded into a "Popup" rather the script redirects as planned to the "Login page". The oddity, all works fine in MSIE 9 and if I keep the login script in a "new window" of it's own all goes well with all the browsers.... any ideas?

Appreciatively,
Ted

jscheuer1
08-12-2013, 03:20 AM
Since you say one works and the other doesn't, please define how "Popup" is different from a "new window".

tedteeter
08-12-2013, 03:44 AM
Greetings John,

The "Popup" is a "Hidden Div" invoked by javascript while "New Window" references a complete new browser window. Additionally a pattern exists in the scripts use for browsers "Firefox 19?" and "Chrome". The login script works fine and I am logged in however when I select a button which I have configured to open a new window, opens a "New "Browser Window" for the page that is login script protected page the new window defaults to the default login page as selected when the user isn't logged in. Again, however, if I login via the new default login page that loaded the newly loaded login page it works fine as another session is established in the new browser window and the buttons work correctly...Appears as though sessions aren't working for browsers "FF", "Chrome" within the iframe??...any ideas?

Appreciatively,
Ted

Nile
08-12-2013, 04:14 AM
Well, since you're saying it works fine in Internet Explorer but not Firefox or Chrome, let's try something. At the top of each page that uses a session (under after you start the session), add:


<?php
echo "Session ID: " . session_id();
?>

That'll tell us what's happening between the two pages and let us know if the session IDs are changing or not.

jscheuer1
08-12-2013, 04:28 AM
Yes, and while we're at it, can we see this javascript code please? Or better yet, can we have a link to the page?

tedteeter
08-15-2013, 04:15 AM
John, Nile August 14th 2013

I apologize that I didn't respond immediately after your helpful information that did resolve the issue. I utilize a "Session.php" and the session wasn't past through the session file due to quotation errors. After I replaced the quotes the session id passed amazingly to provide a sigh of relief....I much appreciate your combined efforts "John", "Nile" You're doing great work in here !!
Appreciatively,
Ted

Nile
08-16-2013, 02:13 AM
Glad to help :)