Saturday, January 29, 2011

Session loss in dotProject

I'm setting up a dotProject installation, but my session is lost on every pageload and I get redirected to the login page. It seems the session variable "dotproject" is missing from every link. When I forge links manually (http://localhost/dotproject/index.php?m=ticketsmith&dotproject=....) the pages work fine.

Please advise.

EDIT:

I get the following warnings when enabling debug mode:

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Apache\htdocs\dotproject\index.php:24) in C:\Apache\htdocs\dotproject\includes\session.php on line 207 Warning: Cannot modify header information - headers already sent by (output started at C:\Apache\htdocs\dotproject\index.php:24) in C:\Apache\htdocs\dotproject\index.php on line 64 Warning: Cannot modify header information - headers already sent by (output started at C:\Apache\htdocs\dotproject\index.php:24) in C:\Apache\htdocs\dotproject\index.php on line 65 Warning: Cannot modify header information - headers already sent by (output started at C:\Apache\htdocs\dotproject\index.php:24) in C:\Apache\htdocs\dotproject\index.php on line 66 Warning: Cannot modify header information - headers already sent by (output started at C:\Apache\htdocs\dotproject\index.php:24) in C:\Apache\htdocs\dotproject\index.php on line 67 Warning: Cannot modify header information - headers already sent by (output started at C:\Apache\htdocs\dotproject\index.php:24) in C:\Apache\htdocs\dotproject\index.php on line 219

  • If you're running Firefox, you should run HttpFox, and inspect the cookies returned by the server. The problem could be related to an invalid hostname, causing the browser to reject the session cookie.

    : Thanks for the suggestion, but I don't get back any cookies at all...
    Lekensteyn : In index.php, could you uncomment line 24 (`error_reporting(E_ALL)`) and place any error messages here? I've a feelng that you get `Cannot send session cookie - headers already sent`. How did you upload dotProjects files, and edit these?
    : Thanks again for the help... I've updated my question based on your suggestion. Regarding your question: I don't exactly understand what you mean by uploading dotProjects files (I unzipped them on a server locally).
    Lekensteyn : Did you strip any comments? Because line 24 in index.php contains the line `error_reporting(E_ALL);` (latest version from Sourceforge). If you don't mind, could you run `phpinfo();`, and upload the result somewhere?
    : Here you go: http://akosch.rewq.org/info.htm
    : Nevermind: got it working by tweaking php.ini... Thank you for your time!
    Lekensteyn : COuld you post your solution? Others might find it helpful too ;)
    : I needed to enable output_buffering in the php.ini file.
    From Lekensteyn

0 comments:

Post a Comment