我在日志中收到此错误....
我该怎么做才能解决这个问题?
2012-06-22T10:53:13+10:00 ERR (3): Zend_Session::start() - /home/commstrat2_web/webrepos/zend/library/Zend/Session.php(Line:469): Error #2 session_start() [<a href='function.session-start'>function.session-start</a>]: open(/var/lib/php/session/sess_ta9eajdp2oirutoitjuk3vss10, O_RDWR) failed: Permission denied (13) Array
/home/commstrat2_web/webrepos/zend/library/Zend/Session.php(Line:479): Error #2 session_write_close() [<a href='function.session-write-close'>function.session-write-close</a>]: open(/var/lib/php/session/sess_ta9eajdp2oirutoitjuk3vss10, O_RDWR) failed: Permission denied (13) Array
/home/commstrat2_web/webrepos/zend/library/Zend/Session.php(Line:479): Error #2 session_write_close() [<a href='function.session-write-close'>function.session-write-close</a>]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) Array - Thrown by: /home/commstrat2_web/webrepos/zend/library/Zend/Session.php on line 482
答案 0 :(得分:3)
使您的resources.session.save_path可写。
你可以这样做:
chmod 775 /path/to/data/session
In Zend Framework Bootstrap yourProject/application/configs/application.ini:
resources.session.save_path = APPLICATION_PATH "/../data/session"
答案 1 :(得分:0)
如果您使用的是selinux,请添加selinux规则:
semanage fcontext -a -t httpd_sys_rw_content_t '/path/to/session'
restorecon -v '/path/to/session'