We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4192
    • 43 Posts
    One of the websites I’m running - using MODx 0.9.1 - started having weird problems with stats.
    On the main admin page, instead of showing the visitors’ stats, the following lines appear:
    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtual/site146/fst/var/www/html/test/manager/actions/static/welcome.static.action.php on line 110
    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtual/site146/fst/var/www/html/test/manager/actions/static/welcome.static.action.php on line 117
    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtual/site146/fst/var/www/html/test/manager/actions/static/welcome.static.action.php on line 124
    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtual/site146/fst/var/www/html/test/manager/actions/static/welcome.static.action.php on line 132
    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtual/site146/fst/var/www/html/test/manager/actions/static/welcome.static.action.php on line 139
    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtual/site146/fst/var/www/html/test/manager/actions/static/welcome.static.action.php on line 146
    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtual/site146/fst/var/www/html/test/manager/actions/static/welcome.static.action.php on line 155
    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtual/site146/fst/var/www/html/test/manager/actions/static/welcome.static.action.php on line 162
    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtual/site146/fst/var/www/html/test/manager/actions/static/welcome.static.action.php on line 169

    Is there anything I can do to make that section back to work?

    Any help would be greatly appreciated
      • 25663 MODX Staff
      • 12,272 Posts
      The built in stats are notoriously problematic. In fact, they’re so bad, that they’ve been removed completely from the next distribution, as they can cause sites with even moderate site traffic to have severe performance problems.

      I’d suggest using a log analysis package (like AW Stats) or Google Analytics which is now instantly available to everyone.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 4192
        • 43 Posts
        OK, in that case can you please tell me how can I avoid that (almost) every page of the admin section show those error codes?
          • 25663 MODX Staff
          • 12,272 Posts
          Turn of visitor logging in the site config and trunc the various config tables. You can do the second part from the manager by going to the backup manager and clicking the red underlined numbers. I suspect yours have reached a pretty large size.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me