Last modified: 2010-05-15 15:48:31 UTC
$ w3m -dump \ http://radioscanningtw.jidanni.org/index.php?title=Special:Statistics | head -3 Warning: Division by zero in ...SpecialStatistics.php on line 53
Please state the value of site_stats.ss_users; I'm guessing it will be zero. This sounds like another "messed up statistics table" bug.
Must be 0 I suppose too. Maybe I will check it when I supposedly get ADSL. Moral of story: always check for 0 before dividing external items anyway!
Well, it turns out there is nothing there: -- Dumping data for table `wiki_site_stats` /*!40000 ALTER TABLE `wiki_site_stats` DISABLE KEYS */; LOCK TABLES `wiki_site_stats` WRITE; UNLOCK TABLES; /*!40000 ALTER TABLE `wiki_site_stats` ENABLE KEYS */; So at least be prepared for that possibility when writing the code. Hmmm, how shall I medicate that condition best? By the way, here are some other wiki observations that I hope your code is prepared for: ss_admins: -1 ss_images: 0 ss_good_articles: 18446744073709551615
You can run maintenance/initStats.php to initialise the site_stats table, or indeed, reset the whole thing if it turns bad. Checking for a missing or invalid site_stats row appears to have been added in trunk...