Using Zend session with an HTML framset

Trying to incorporate a Zend session on a page being viewed as part of a frameset caused me a headache yesterday.

I couldn’t understand how everytime I refreshed the page to try and test the session it seemed to be reset. Var_dumping the session before and after the data was getting assigned showed that everything was getting stored as expected, but each time the page loaded, the session returned NULL again.

Eventually decided that being used on a page inside a frameset was the problem, possibly due to the different rates at which the seperate pages load, which could lead to the session to get wiped.

Solution to the problem being, do all the session work in the page declaring the frameset, this way it is only loaded once.

Leave a Reply

Your email address will not be published. Required fields are marked *