3

我在日志中收到此错误....

我能做些什么来解决这个问题?

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
4

2 回答 2

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"
于 2012-06-22T01:03:12.827 回答
0

如果您使用的是 selinux,请添加 selinux 规则:

semanage fcontext -a -t httpd_sys_rw_content_t '/path/to/session'

restorecon -v '/path/to/session'
于 2019-02-07T16:35:02.127 回答