ERROR READING SESSION DATA in Kohana 3.2

此生再无相见时 提交于 2019-12-12 00:42:03

问题


I am having a problem with the session with the web development framework Kohana 3.2 that apparently is a bug that, at most, can be workarounded. It reports SESSION_EXCEPTION [ 1 ]: ERROR READING SESSION DATA. My Kohana application isn't in the root folder and I wonder if that has something to do with it.

I have tryed several possible solutions but none of them have worked. Here are some of them:

1) using one library (Facebook SDK), session was initialized on it's own, and session handling was done using the $_SESSION variable. So there were two cookies - session (Kohanas session id) and PHPSESSID. *=> There is only one "session" and "PHPSESSID" variables in $_COOKIE*

2) Workaround or solution was setting in php.ini session.auto_start = 0. => I am working in a shared server (iPage) and I am pretty sure I can't edit the php.ini file.

3) some user's session files were trying to get saved to a directory that didn't exist. So he changed the session.save_path to a valid path and that fixed it. => If he was talking about this php native function , I've created a directory and set it calling this function as the session folder. It didn't work as well. However, I got unsure if I did it correctly (the path "/" would be the root, and not where kohana is in, right?)

4) Apparently this bug is reported to kohana here but I wasn't able to act from reading it.

Is somebody out there able to help me? Thanks in advance.


回答1:


After researching very much about it and upgradion to KOHANA 3.3, I came to the conclusion that this error was caused when the native function session_start() was called in the Kohana_Session_Native class. It was caused because PHP was trying to save the session in an unavaiable directory. Thus, i just changed this path in php.ini and everything was solved. You may also just call the function session_save_path('YOUR_PATH') in the application/bootstrap.php.




回答2:


in my case, i run "chmod 777 -R /path/to/session" command and the error has disappeared.



来源:https://stackoverflow.com/questions/17810509/error-reading-session-data-in-kohana-3-2

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