Forums | Mahara Community
Support
/
Constant Login Issue
15 April 2011, 14:22
Hello. Thanks in advance for your time. We're having an issue where users have to login to Mahara with each page. It is intermittent. It will happen to all users for anywhere from an hour to 2 days and then go away. Everything with Mahara works fine other than this issue. Wheneve it occurs I get the following error in my Apache error log:
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] [WAR] ab (lib/htmlpurifier/HTMLPurifier/DefinitionCache/Serializer.php:103) file_put_contents() [function.file-put-contents]: Only 0 of 99356 bytes written, possibly out of free disk space, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] Call stack (most recent first):, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] * log_message("file_put_contents() [function.file-put-contents]: ...", 8, true, true, "/usr/share/mahara/lib/htmlpurifier/HTMLPurifier/De...", 103) at /usr/share/mahara/lib/errors.php:444, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] * error(2, "file_put_contents() [<a href='function.file-put-co...", "/usr/share/mahara/lib/htmlpurifier/HTMLPurifier/De...", 103, array(size 2)) at Unknown:0, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] * file_put_contents("/maharadata/htmlpurifier/HTML/4.1.1,e960b653e73a6d...", "O:27:"HTMLPurifier_HTMLDefinition":13:{s:4:"info";...") at /usr/share/mahara/lib/htmlpurifier/HTMLPurifier/DefinitionCache/Serializer.php:103, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] * HTMLPurifier_DefinitionCache_Serializer->_write("/maharadata/htmlpurifier/HTML/4.1.1,e960b653e73a6d...", "O:27:"HTMLPurifier_HTMLDefinition":13:{s:4:"info";...") at /usr/share/mahara/lib/htmlpurifier/HTMLPurifier/DefinitionCache/Serializer.php:19, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] * HTMLPurifier_DefinitionCache_Serializer->set(object(HTMLPurifier_HTMLDefinition), object(HTMLPurifier_Config)) at /usr/share/mahara/lib/htmlpurifier/HTMLPurifier/DefinitionCache/Decorator.php:37, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] * HTMLPurifier_DefinitionCache_Decorator->set(object(HTMLPurifier_HTMLDefinition), object(HTMLPurifier_Config)) at /usr/share/mahara/lib/htmlpurifier/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php:24, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] * HTMLPurifier_DefinitionCache_Decorator_Cleanup->set(object(HTMLPurifier_HTMLDefinition), object(HTMLPurifier_Config)) at /usr/share/mahara/lib/htmlpurifier/HTMLPurifier/Config.php:353, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] * HTMLPurifier_Config->getDefinition("HTML", false) at /usr/share/mahara/lib/htmlpurifier/HTMLPurifier/Config.php:323, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] * HTMLPurifier_Config->getHTMLDefinition() at /usr/share/mahara/lib/htmlpurifier/HTMLPurifier/Generator.php:59, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] * HTMLPurifier_Generator->__construct(object(HTMLPurifier_Config), object(HTMLPurifier_Context)) at /usr/share/mahara/lib/htmlpurifier/HTMLPurifier.php:127, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] * HTMLPurifier->purify("<h2><span style="color: #cc0000;">Welcome to Mahar...") at /usr/share/mahara/lib/web.php:2514, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] * clean_html("<h2><span style="color: #cc0000;">Welcome to Mahar...") at /maharadata/dwoo/compile/default/usr/share/mahara/theme/raw/templates/index.tpl.d17.php:8, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] * include("/maharadata/dwoo/compile/default/usr/share/mahara/...") at /usr/share/mahara/lib/dwoo/dwoo/Dwoo.php:364, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] * Dwoo->get(object(Dwoo_Template_File), array(size 29)) at /usr/share/mahara/lib/dwoo/mahara/Dwoo_Mahara.php:119, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] * Dwoo_Mahara->fetch("index.tpl") at /usr/share/mahara/lib/dwoo/mahara/Dwoo_Mahara.php:106, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] * Dwoo_Mahara->display("index.tpl") at /usr/share/mahara/index.php:108, referer: http://mahara/
[Fri Apr 15 14:55:23 2011] [error] [client 10.1.28.154] , referer: http://mahara/
I can't figure this out. Any ideas?
17 April 2011, 22:10
At the risk of asking the obvious:
"Only 0 of 99356 bytes written, possibly out of free disk space"
Did you check that the dataroot has plenty of disk space?
Also, is it a particular type of browser that's getting logged out or does it happen with IE, Chrome and Firefox?
Cheers,
Francois
19 April 2011, 14:45
I expanded the hard drive. What threw me was that I had my Mahara data on a separate drive with plenty of space, but the drive for my OS was getting full. There are, however, three things I still must consider:
1. The issue was intermittent, so I don't know if it's fixed or not.
2. I still have to log in twice. I log in once at the first page, and after I'm let in, the next link I click (no matter what it is) makes me log in again. After than I seem to be OK. Still not right, but it will get us through the semester if need be. Nothing in the Apache or Mahara error logs.
3. That HTML Purifier file it references doesn't exist (the one in /lib/). The folder didn't even exist. I don't fully understand the interaction between Mahara and HTML Purifier and I can't seem to find any documentation. Can anyone point me to any good places? I'd like to know what files/folders do what, how they are linked, how I can configure it, etc.
Any thoughts on this or anything else would be much appreciated. Thanks, Francois, for your resposne.
EDIT: This problem happens on IE and Firefox.
20 April 2011, 0:32
The second problem you describe has happened to me before on my own installations, and it happens when the host part of the url I used to access the login page is different from the wwwroot defined in config.php (or the config table of the db). For example when I log in at http://localhost/mahara, but wwwroot says http://mahara.localhost.21 April 2011, 9:54
You're right. If I go to http://mahara/ (on-campus) and log in from there, I need to log in again when it points me to http://mahara.domain.edu/.
I had this problem with Moodle and I was able to set an Alias in Apache. That doesn't seem to be working for Mahara. Is there any way to fix this issue or am I stuck with it?
I appreciate all the help on this issue from everyone.
25 April 2011, 18:03
You may need to use Apache's mod_rewrite to perform a redirection from within your Apache config file.
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
Cheers,
Francois
25 April 2011, 18:03
You could use a redirect an apache rather than an alias, I think that'd work.
The trouble is Mahara only allows for a single wwwroot to be used when writing its links. You get the double login because you end up with two session cookies in your browser - one from 'mahara' and another from mahara.domain.edu. You could try hacking the code to always set/read the cookie with the mahara.domain.edu cookie domain, but that kind of thing will probably just get rejected by the browser.