ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


Error on Login Page


  • 2011-11-09 21:18:02

    Error on Login Page

    If you are asking for help, provide lots of detail so problems can be reproduced.

    I want to know what could be causing this error to appear at the top of the Login Page of my Atutor site. Please advise on why this is happening and how to change it.

    Error is:

    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/success1/public_html/www.MySite.com/specificpage/include/lib/output.inc.php on line 269

    ___________________

    My hosting, HostGator, could not figure it out- after several calls, saying that they could not spot any obvious error in the coding. They did conclude that the entire function was affected by this and would not properly execute. The function is included below:

    while ($row = mysql_fetch_assoc($result)) {
    //Do not overwrite the variable that existed in the cache_template already.
    //The edited terms (_c_template) will always be at the top of the resultset
    //0003279
    if (isset($_cache_template[$row['term']])){
    continue;
    }

    // saves us from doing an ORDER BY
    if ($row['language_code'] == $_SESSION['lang']) {
    $_cache_template[$row['term']] = stripslashes($row['text']);
    } else if (!isset($_cache_template[$row['term']])) {
    $_cache_template[$row['term']] = stripslashes($row['text']);
    }
    }

  • 2011-11-10 10:14:32

    Re: Error on Login Page

    This warning is very likely due to your database setup.

    You could try:

    1. Find the credentials to access ATutor database @ include/config.inc.php

    2. Use them to connect to ATutor database thru command line

    3. Make sure the tables are properly created and try a couple of "select" statements, especially on AT_language_text & AT_language_text that are used by the SQL which outputs a problematic $result.

  • 2012-10-02 13:14:30

    Re: Error on Login Page

    I'm having the same problem. Has there been any solutions?

  • 2012-10-02 13:36:31

    Re: Error on Login Page

    This problem sounds typical of an ATutor installation that was installed by unpacking ATutor on a local computer, then uploading all the files to the server.

    Instead, upload just the ATutor bundle, then unpack the files on the server. File-by-file very often result in minor file corruptions.

  • 2012-10-02 15:03:44

    Re: Error on Login Page

    I did as requested and still receive the error message using 2.0.3

  • 2012-10-02 15:17:41

    Re: Error on Login Page

    What exactly is the error message, and can you provide the additional details below describing your server environment.

    Are you on HostGator?

    Things to describe:
    Operating system ATutor is installed on -
    ATutor version -
    Patch #s applied -
    ATutor theme name -
    PHP version -
    MySQL version -
    Webserver & version -
    Copies of error messages -
    Changes to default settings -
    Web browser being used -
    ...and anything else relevant -

  • 2012-10-02 18:03:01

    Re: Error on Login Page

    I am with HostGator
    ATutor v 2.0.3
    All patches that came with it are applied
    Default theme
    No changes to default settings
    ATutor was unpacked, installed then ran and following error message appeared
    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/XXXXX/public_html/ATutor/include/lib/output.inc.php on line 269
    Linux Apache v2.2.22
    PHP v5.2.17
    MySQL v5.55.23-55
    Pearl v5.8.8
    Kernel v.3.8.28

  • 2012-10-03 10:10:52

    Re: Error on Login Page

    I have eliminated the error message by doing the following:

    I have modified lines 268 and 269 as follows:

    $result = mysql_query($sql, $db);
    while ($row = mysql_fetch_assoc($result)) {

    Modified to:

    $result = @mysql_query($sql, $db);
    while ($row = @mysql_fetch_assoc($result)) {