Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.9.4
    • Fix Version/s: 1.9.8
    • Component/s: Other
    • Labels:
      None
    • Environment:
      Centos Linux 4.6, MySQL 5, Apache 2, PHP 5.2.9
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      One of our clients has a site, running 1.9.4+ (yes I know - they'll be upgrading soon) that has been running fone for a couple of years. All of a sudden, a couple of weeks ago, the stats generation started to fail overnight. THey've only just noticed and asked me to look into it. I increased the debug level and ran cron manually and got this:

      PHP Warning: array_merge(): Argument #2 is not an array in /var/www/vhosts/tripleaworkshops.ibo.org/httpdocs/lib/statslib.php on line 1273
      PHP Warning: array_unique(): The argument should be an array in /var/www/vhosts/tripleaworkshops.ibo.org/httpdocs/lib/statslib.php on line 1279
      PHP Warning: array_values(): The argument should be an array in /var/www/vhosts/tripleaworkshops.ibo.org/httpdocs/lib/statslib.php on line 1279
      PHP Warning: implode(): Invalid arguments passed in /var/www/vhosts/tripleaworkshops.ibo.org/httpdocs/lib/statslib.php on line 124
      Running daily statistics gathering, starting at 1255478400:
      .........PHP Notice: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) AS statsreads,
      (SELECT COUNT('x')
      ' at line 8

      INSERT INTO mdl_stats_user_daily (stattype, timeend, courseid, userid, statsreads, statswrites)

      SELECT 'activity' AS stattype, 1255564800 AS timeend, d.courseid, d.userid,
      (SELECT COUNT('x')
      FROM mdl_log l
      WHERE l.userid = d.userid AND
      l.course = d.courseid AND l.time >= 1255478400 AND l.time < 1255564800 AND
      l.action IN ()) AS statsreads,
      (SELECT COUNT('x')
      FROM mdl_log l
      WHERE l.userid = d.userid AND
      l.course = d.courseid AND l.time >= 1255478400 AND l.time < 1255564800 AND
      in /var/www/vhosts/tripleaworkshops.ibo.org/httpdocs/lib/weblib.php on line 6942
      ...error occured, completed 0 days of statistics.

      I have no idea what is causing this - the moodle code has not been updated for some time, and we haven;t made any changes to their site for months. Any idea what could be causing this?

      This is now really urgent.

      regards

      Sean K

        Gliffy Diagrams

          Attachments

            Activity

            keoghs Sean Keogh created issue -
            mblake Michael Blake made changes -
            Field Original Value New Value
            Assignee Martin Dougiamas [ dougiamas ] Dongsheng Cai [ dongsheng ]
            dongsheng Dongsheng Cai made changes -
            Attachment statslib.patch [ 18860 ]
            dongsheng Dongsheng Cai made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Cannot Reproduce [ 5 ]
            ashleyholman Ashley Holman made changes -
            Resolution Cannot Reproduce [ 5 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            Fix Version/s 1.9.8 [ 10400 ]
            dongsheng Dongsheng Cai made changes -
            Status Reopened [ 4 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            dougiamas Martin Dougiamas made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            QA Assignee nobody
            dougiamas Martin Dougiamas made changes -
            Workflow jira [ 34079 ] MDL Workflow [ 63384 ]
            dougiamas Martin Dougiamas made changes -
            Workflow MDL Workflow [ 63384 ] MDL Full Workflow [ 92623 ]

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Mar/10