Forums | Mahara Community
08 June 2009, 4:04 AM
I have a little problem with -i think- the sessions.
I installed both, Moodle and Mahara on my Mac OS. Moodle works pretty fine and everything is ok. Mahara is installed correctly and starts up without any problems. After i have logged in, no matter where i click, every time Mahara loads a new page, the log in pops up. Every changes i do won't be saved.
Is there like a thing i forgot or is this a session problem with Moodle (the explained bug appears, too if Moodle wasn't running at all!)? I installed both on a MySQL db and the tables for both Moodle and Mahara are created in separate folders.
I would be really thankful for an advice or a short help.
Thanks in advance,
08 June 2009, 8:49 AM
thanks for your fast reply. The troubleshooting page couldn't help. I read it before.
But what helped was the debug mode. Now Mahara stores the changes and doesn't annoys me with the login. But there are some curious error messages i have to look thru.
08 June 2009, 6:09 PM
That's very strange - are you saying that with debug mode on it works, and if you turn debug mode off it breaks again?
If you post the messages here, we can probably help you with those
09 June 2009, 10:44 AM
really strange, yes. I tried it several times. Whenever i start it with developermode=true it works. If i say developermode=false the login appears every time mahara loads a site.
This message appears when i log in:
[WAR] a8 (init.php:223) Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/mahara/lib/errors.php:204)
[WAR] a8 (auth/user.php:883) session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent
Here are some more messages appearing on top of mahara:
log_message("Use of undefined constant LOG_LEVEL_DEBUG - assume...", 8, true, true, "/Applications/MAMP/htdocs/mahara/config.php", 73) at /Applications/MAMP/htdocs/mahara/lib/errors.php:378
error(8, "Use of undefined constant LOG_LEVEL_DEBUG - assume...", "/Applications/MAMP/htdocs/mahara/config.php", 73, array(size 18)) at /Applications/MAMP/htdocs/mahara/config.php:73
require("/Applications/MAMP/htdocs/mahara/config.php") at /Applications/MAMP/htdocs/mahara/init.php:58
require("/Applications/MAMP/htdocs/mahara/init.php") at /Applications/MAMP/htdocs/mahara/account/index.php:33
Hope this helps.
09 June 2009, 7:13 PM
Hi - two things:
- The constant LOG_LEVEL_DEBUG isn't defined anywhere in Mahara, but LOG_LEVEL_DBG is - could you check your config.php and make sure there's no places where the former is used? (Just switch it with the latter one wherever you see it)
- Could you please check your config.php, and make sure there are no blank lines, spaces, or any other kind of whitespace at the end of the file after the ?> marker?
Once you've done both of those, have a try with debugging on and off again, and see what behaviour you get.
13 June 2009, 11:21 AM
sorry for the late response but I have been quite busy the last days.
I made both of the two things you mentioned. The result is as follows:
- With $cfg->log_backtrace_levels = LOG_LEVEL_DBG; no differences between developermode = true or developermode = false can be determined. Every time i click on something and mahara loads a site the log in appears. So there is no difference according to the behaviour if i change developermode from false to true. In any case no debug or error message is being shown..
Like i said i am using mac os but it seems like installing has worked and the db is created.
13 June 2009, 8:21 PM
It's almost like Mahara can't write to the dataroot directory for some reason to write the session files. Can you try adding this to the config file, and log out/clear cookies/try again?:
$cfg->insecuredataroot = true;
16 June 2009, 3:32 AM
tried it but no changes at all. Log-in every time i click on something and again with DBG instead of DEBUG no error messages at all.
16 June 2009, 6:46 PMHi - I'm afraid I don't have any other ideas... maybe a re-install would fix it, and it would very likely work on a linux server, but us core developers don't have access to a mac so it's very hard to track down such problems