ZF2 - Session dump on page change / refresh

こ雲淡風輕ζ 提交于 2019-12-13 06:49:38

问题


Last week i asked a question which is still unresolved (unfortunately). Here is the link : ZF2 empty session container between pages

I'm opening a new question today because i found more understandable clues to explain my problem.

This is very simple : Zend Framework 2 and/or PHP dump/purge my session containers on every single page load or refresh. It's even working like this with or without AJAX calls.

Whatever i do, i can't persist my session datas because all is reset permanently.

I tried many things found around the web, like :

  • Init Zend Session Manager (with and without SessionConfig)
  • Use alternative storages like memcache with Zend\Cache\Storage
  • ...

I'm looking around for a solution for more than 2 weeks now ... and i can't find anything to resolve my problem.

I really hope that some of you guys can help me.

Thx


回答1:


I finally found my solution, i was adding a Zend\Db\ResultSet to the session. I think, because this object is too huge, it overloads the session ... but this is only a supposition.

Since i replaced the ResultSet storage by an array of Mapper objects, everything works fine.

By the way, i looked around on the internet and i didn't found anything about that kind of problem.

Hope this will help.

Thanks a lot for the help, especially to @TimFountain.



来源:https://stackoverflow.com/questions/22133863/zf2-session-dump-on-page-change-refresh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!