Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-20819

Stats generation problem

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.9.4
    • 1.9.8
    • Other
    • None
    • Centos Linux 4.6, MySQL 5, Apache 2, PHP 5.2.9
    • MySQL
    • MOODLE_19_STABLE
    • 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

      Attachments

        Activity

          People

            dongsheng Dongsheng Cai
            keoghs Sean Keogh
            Nobody Nobody
            Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              25/Mar/10