Urgent help needed : Query failed in load_user_capability.
I've changed the name of the primary admin and his password.
I've assigned some role Teacher's, Admin, ...
A user (sudent) tried to log and got the folowing error message :
Query failed in load_user_capability.
He pressed the "continue" buton and reached the start page. He couldn't log into his course.
I tried to log as primary admin and got the same error message, And I've lost all my admin capabilities.
What shall I do ?
Thanks for your urgent help
Re: Urgent help needed : Query failed in load_user_capability.
Re: Urgent help needed : Query failed in load_user_capability.
Re: Urgent help needed : Query failed in load_user_capability.
http://moodle.org/mod/forum/discuss.php?d=58405
I'm running 1.7 and I thought to upgrade to 1.7.1. But the bug still has to be fixed as it seems not fixed in 1.8.
- http://moodle.org/mod/forum/discuss.php?d=58723&mode=3
- http://tracker.moodle.org/browse/MDL-6456
- http://tracker.moodle.org/browse/MDL-8159I haven't received any answer to my own tracker.
http://tracker.moodle.org/browse/MDL-8241
I haven't received any answer to this post.
Asking for urgent help and not getting answer is a bit dispointing.
Can someone tell me, either Martin Dougiamas or anyone, if the Moddle team is working on this issue and preparing a patch for 1.7 ?
Re: Urgent help needed : Query failed in load_user_capability.
Just for reference, here's the query:
SELECT rc.capability, c1.id as id1, c1.id as id2, (c1.contextlevel * 100) AS aggrlevel,
SUM(rc.permission) AS sum
FROM mdl_role_assignments ra, mdl_role_capabilities rc, mdl_context c1
WHERE ra.contextid=c1.id AND ra.roleid=rc.roleid
AND ra.userid=2 AND c1.id IN (1)
AND rc.contextid=1
AND ((ra.timestart = 0 OR ra.timestart < 1172848118)
AND (ra.timeend = 0 OR ra.timeend > 1172848118))
GROUP BY rc.capability, (c1.contextlevel * 100), c1.id
HAVING
SUM(rc.permission) != 0
ORDER BY aggrlevel ASC with limits (, )
Re: Urgent help needed : Query failed in load_user_capability.
I had run mysqlcheck on the database and it totally buggered things. There were lots of 'file not found' errors of .frm files and somehow it freaked mysqld out to such the extent that I reinstalled mysql (after dumping my mediawiki db). I was running mysql-5.0.24a package from OpenBSD4.0 ports but now I downgraded to mysql-5.0.22. I re-ran the Moodle installation (considering I don't have any courses set up yet), went through the creation of a new user to check the email authentication. After that I logged out of my new user and logged into the Administrator account again. I got the same error AGAIN. And this time I haven't even deleted test courses or users!
I find it hard to believe this would be a database server problem. I'm rapidly loosing faith in using Moodle as my e-learning platform.
.s
Re: Urgent help needed : Query failed in load_user_capability.
Hello
Today I had the same problem. When I logged in as administrator I got the message Query failed in load_user_capability and lost all administrative privileges.
Luckily I solved it by checking the database in my cpanel. I noticed that some tables where left open. So I run the repair option and the problem was solved.
Re: Urgent help needed : Query failed in load_user_capability.
Hello all,
I've also been getting this problem several times over the past week or two. Try to update some course or something, and system returns error message that it couldn't update. Further activity produces the 'Query failed ....etc' message. Also, I loose all my admin priveleges and end up logged in as an ordinary user. Can't see hidden courses etc.
As I'm busy trying to meet a deadline, I haven't had time to investigate, so have resorted to the blunt instrument of simply rebooting the server. I'm on xp professional, xampp, fast machine, with bags of RAM (4gb).
Matt
Re: Urgent help needed : Query failed in load_user_capability.
Re: Urgent help needed : Query failed in load_user_capability.
Error from Moodle:
File './moodle/tbg_groups_members.MYD' not found (Errcode: 9)
SELECT * FROM tbg_groups_members WHERE userid = '3'
Can't create/write to file '/tmp/#sql_1d25_0.MYD' (Errcode: 17)
SELECT rc.capability, c1.id as id1, c1.id as id2, (c1.contextlevel * 100) AS aggrlevel, SUM(rc.permission) AS sum FROM tbg_role_assignments ra, tbg_role_capabilities rc, tbg_context c1 WHERE ra.contextid=c1.id AND ra.roleid=rc.roleid AND ra.userid=3 AND c1.id IN (1) AND rc.contextid=1 AND ((ra.timestart = 0 OR ra.timestart <1172882520 and="" or=""> 1172882520)) GROUP BY rc.capability, (c1.contextlevel * 100), c1.id HAVING SUM(rc.permission) != 0 ORDER BY aggrlevel ASC
From the moodle db on the filesystem:
# ls -l tbg_groups_members.*
-rw-rw---- 1 _mysql _mysql 0 Mar 2 08:00 tbg_groups_members.MYD
-rw-rw---- 1 _mysql _mysql 1024 Mar 2 08:00 tbg_groups_members.MYI
-rw-rw---- 1 _mysql _mysql 8666 Mar 2 08:00 tbg_groups_members.frm
Re: Urgent help needed : Query failed in load_user_capability.
Does anyone here know the recommended number of mysql's open-file-limit variable for a Moodle installation?
Re: Urgent help needed : Query failed in load_user_capability.
http://www.openbsdsupport.org/mysql.htm
I really wish I could find some more extensive recommendations for mysql settings in these forums...
Re: Urgent help needed : Query failed in load_user_capability.
We are having the same issue. I made the change to the open_files_limit for mysql and the problem didn't go away. Thanks!
Re: Urgent help needed : Query failed in load_user_capability.
Re: Urgent help needed : Query failed in load_user_capability.
We are using MySQL 5.0 so I don't know if the process is the same for you. Under the MySQL folder there is a file called my.ini where I added 'open-files-limit = 10240' under the [mysqld].
If I run "show variables;" at the MySQL command line it returns the value of 2048 with this new setting. I feel pretty ignorant of the whole process and its value so take it for what it's worth. Good Luck, let me know if you figure it out.
Re: Urgent help needed : Query failed in load_user_capability.
Re: Urgent help needed : Query failed in load_user_capability.
Urgent
I have now updated to moodle 1.7.2 and have my table_cache setting to 128 and my open_files_limit is set to 2048 and and i constantly getting "Query failed in load_user_capability" is there a solution for Windows users? I have learners who need to use it without moodle failing every 5 minutes. Please help, Thanks
Re: Urgent help needed : Query failed in load_user_capability.
any news on how to prevent this happening again on our windows server would be helpful ( I guess this post is mostly to keep this thread active )
Re: Urgent help needed : Query failed in load_user_capability.
after clear up some space in the harddisk, problem solved.
Re: Urgent help needed : Query failed in load_user_capability.
There is a tracker bug posted, http://tracker.moodle.org/browse/MDL-10090 but nothing from the Moodle team yet.