为什么我看到这个会话错误与cakephp

时间:2012-05-18 16:24:26

标签: cakephp cakephp-1.3

我在godaddy上安装了cakephp应用程序,但有些错误我看到这个错误请任何人帮助我...脚本正常工作但我无法登录用户控制器

   Warning (2): session_start() [function.session-start]: open(/var/chroot/home/content/37/7269737/tmp/sess_5fngsu7g8llj60a9075mkkgh07, O_RDWR) failed: No such file or directory (2) [ROOT/7269737/html/cake/libs/cake_session.php, line 587]

    Warning (2): session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/37/7269737/html/cake/libs/debugger.php:683) [ROOT/7269737/html/cake/libs/cake_session.php, line 587]

    Warning (2): session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/37/7269737/html/cake/libs/debugger.php:683) [ROOT/7269737/html/cake/libs/cake_session.php, line 587]

    Warning (2): Cannot modify header information - headers already sent by (output started at /home/content/37/7269737/html/cake/libs/debugger.php:683) [ROOT/7269737/html/cake/libs/cake_session.php, line 588]


    Warning (2): Unknown: open(/var/chroot/home/content/37/7269737/tmp/sess_5fngsu7g8llj60a9075mkkgh07, O_RDWR) failed: No such file or directory (2) [Unknown, line ??]

    Warning (2): Unknown: Failed to write session data (files). Please verify that the current setting of session.

2 个答案:

答案 0 :(得分:4)

您必须执行以下步骤

  1. 设置写入/ tmp文件夹的默认权限
  2. 将php.ini更改为指向dir,您可以访问而不是/ tmp
  3. 设置Configure :: write('Session.save','cake')并将它们放入蛋糕中 app / tmp你可以在哪里管理权限。
  4. 为此,您必须更改 config / core.php 文件中的会话设置。有几种选择。默认设置是使用php.ini设置来保存会话。 有关详细信息CakePHP Core Configuration Variables

答案 1 :(得分:1)

此错误的直接原因是您无法在目录/var/chroot/home/content/37/7269737/tmp/中写入。

此文件夹不存在,请创建它。

或者它存在,你需要给它0644权限级别。

希望这有帮助!