php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: klaus at capitalfocus dot org
New email:
PHP Version: OS:

 

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

http://pear.php.net/package-stats.php?cid=10&pid=233&rid=1401

Have no idea what's going on there.


Patches

Pull Requests

History

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:
http://pear.php.net/package-stats.php?pid=338

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.

<?php

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

$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] mj@php.net
The database has been updated.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC