Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.8.1
-
Fix Version/s: None
-
Component/s: Unknown
-
Labels:None
-
Environment:IIS 6.0, PHP 4.4.4, IMAP Authentication System, Windows Server 2003
-
Database:MySQL
-
Affected Branches:MOODLE_18_STABLE
Description
Updated to the newest version of moodle today, logged in, then recieved the following page.
-------------------------------------------------------------------------------------------------------------------------------------------
<div id="page">
<!-- END OF HEADER -->
<div id="content">
<br /><div class="box errorbox errorboxcontent">Query failed in load_user_capability.</div><div class="continuebutton"><div class="singlebutton"><form action="http://moodle.paston.ac.uk/" method="post"><div><input type="submit" value="Continue" /></div></form></div></div>
</div> <!-- end div containerContent -->
<!-- START OF FOOTER -->
<div id="footer">
<p class="helplink"><br /><div class="box errorbox errorboxcontent">Query failed in load_user_capability.</div><div class="continuebutton"><div class="singlebutton"><form action="http://moodle.paston.ac.uk/" method="post"><div><input type="submit" value="Continue" /></div></form></div></div>
</div> <!-- end div containerContent -->
<!-- START OF FOOTER -->
<div id="footer">
<p class="helplink"><br /><div class="box errorbox errorboxcontent">Query failed in load_user_capability.</div><div class="continuebutton"><div class="singlebutton"><form action="http://moodle.paston.ac.uk/" method="post"><div><input type="submit" value="Continue" /></div></form></div></div>
</div> <!-- end div containerContent -->
<!-- START OF FOOTER -->
--------------------------------------------------------------------------------------------------------------------
As you can see, the code has gotten into an inifnite loop, the code continues to flow in until I hit stop on my browser window. the first line on the page says "PHP has encountered a Stack overflow", but I do not see how this is possible, I have assigned 128Mb of memory to the script, so it shouldn't overflow perticularly easily.
PHPINFO() output can be seen at http://moodle.paston.ac.uk/meh.php
I have managed to get the source of the error down to this line.
if (!$rs = get_recordset_sql($SQL1)) { error("Query failed in load_user_capability."); }
I am completely unable to find the root of the problem other than pinning down that line of code.
I hope you can help me, my whole moodle system is down at the moment, and we need access to it to do coursework over the next month.
This is a major issue for us.....the entire website becomes unresponsive if one person comes upon this error.
This seems to be the call that causes the hangup. In user/view.php
if ($USER->id != $user->id && empty($USER->realuser) && has_capability('moodle/user:loginas', $coursecontext) &&
! has_capability('moodle/site:doanything', $coursecontext, $user->id, false)) {
it loads the viewed user's entire capabilities list, then finds out if that person is a moodle/site;doanything capable user. Seems like lifting a house off the ground to get a couch out.