|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56071 Download statistics do not agree with graph
Submitted: 2004-05-20 11:24 UTC Modified: 2004-08-11 12:31 UTC
From: klaus at capitalfocus dot org Assigned: mj (profile)
Status: Closed Package: PECL website (PECL)
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: klaus at capitalfocus dot org
New email:
PHP Version: OS:


 [2004-05-20 11:24 UTC] klaus at capitalfocus dot org
Package download statistics does not agree with graph. See this example:

Have no idea what's going on there.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-21 12:25 UTC] klaus at capitalfocus dot org
The difference seems to be precisely 2. (Graph = downloads + 2). However, this does not occur on all packages (e.g., the latest release of HTML_Progress does not display this discrepancy)
 [2004-06-13 01:30 UTC] aidan at virtualexplorer dot com dot au
Looking at a bunch of download statistics for different packages, there's some huge discrepencies.

Here for example:

Total downloads: 550, June downloads: 750.
 [2004-08-11 12:07 UTC] danielc at analysisandsolutions dot com
This probably has to do with the package_stats and downloads tables being out of synch.  Below is a script that can get them in line.  Martin will have the various permissions needed to run it, so I'm foisting this off onto him.


require_once 'DB.php';
$db =& DB::connect('mysql://pear:pear@localhost/pear');

$db->query('lock tables downloads write, package_stats write');

$res =& $db->query('select release, count(*) as quant
from downloads group by release');

while ($res->fetchInto($row)) {
    echo implode(' ', $row) . "<br />\n";
    $db->query('update package_stats set dl_number = '
               . $row['quant']
               . ' where rid = ' . $row['release']);

$db->query('unlock tables');

 [2004-08-11 12:31 UTC]
The database has been updated.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Oct 03 00:01:24 2023 UTC