Jump to content

[SOLVED] SESSION var created and used then value goes missing - in IE7


logansama

Recommended Posts

Good day,

 

To start off, i have traced other posts concerning similar problems with SESSION variable sand IE7, but those issues are slightly different and the threads have ended.

 

The application:

In the interface page one enters a name in textfield. This is sent to php file which uses sql to determine if the given name is in database. If it is, then code generates some response code to user and also store the selected persons 'employeeNumber' to a $_SESSION[''] variable so called.

User sees person exists in list and can then select from a dropdown list (created upon successful retrieval of person) whether to view that persons address data, contact details etc etc. Making selection then tells another php file to use the stored $_SESSION['employeeNumber'] as PrimaryKey in retrieving the needed data.

 

The problem:

I did this in the same way i have for some time, worked in IE6, works fine in FF and opera etc, but doesnt work in IE7, well not completely.

By echo'ing the SESSION value at each step i have found that when the initial search of the person takes place and is found. The session variable is populated with the employeeNumber. Cool IE7 shows session when echoed.

But when i select from dropdown other data to view something goes wrong. With echo of returned data i find that the session variable is empty all of a sudden. The variable still exists but the value given to it is no more.

 

Tested by opening same page in both IE7 and FF2.0 at same time. FF works fine, IE7 no working! Tested in both separately, same results.

 

Majority of the problems and solution i have found both in Google and here in this forum is cookies specific or that session is just not created at all. So it confuses me to madness that the session variable is created and working but then, without opening new tabs or windows or pop-ups the value just goes empty?!

I have even found possible solutions of not having JS includes in the <head> of the file but the in the <body>. This unfortunately made no difference.

 

I considered the idea that the session times-out in IE7 after few seconds if not set, but if i stick to the part of only searching for the person over and testing with that data alone it doesn't seem to time-out?

 

I have reached a dead end. Any help or redirecting to worthy pool of information will be greatly appreciated!

And thank you,

David

 

[EDIT]

I have also looked in the possibility of ob_start() or session_start() possibly having some influence, but with what i know of them i tested and did not manage to determine whether they made any difference whats o ever?!

<ponders if insurance covers purposely destroying PC>  ;D

Link to comment
Share on other sites

<damned my inability to get on forums enough!! - cant for the life of me remember how to edit original post - if even possible>

 

Did some additional testing on sessions in the page. There are basically three key areas where data is passed to and fro between php and interface. I decided to use session_id() to view the id of the session at each of these three "steps".

In firefox all three the session_id's echoed was the same. No difference. And code works fine!

In IE7 each of the three echoed session id's are different!! I do not have in depth knowledge of php SESSIONS etc but i do believe my problem will be solved by getting IE NOT to 'reset' the session at every step (even though i am not sure why it resets as i don't use new windows/tabs??).

 

Now to try this, but please if this additional info helps, please provide any help where you can!

Thank You,

David

Link to comment
Share on other sites

It appears there is some serious problems with IE7 and it handling of sessions, cookies etc.

Even Microsoft isn't giving much info on how to work around the issue but seem to kind-off indicate they are aware of it!

 

So now i develop in-house for FF and the other browsers, no longer will i bother to make the code IE compatible! :D YAY!!

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.