Fork me on GitHub

AdvStats  Bottom

  • Hi,
    I tried to install AdvStats on PN 0.7.6.4 (linux server with PHP 5) and I've a problem with monthly stats (stats don't appear). The error is: "JGraph Error: Empty data array specified for plot. Must have at least one data point".
    What is more "strange" is that dayly stats work!
    Do you know if there is a problem with AdvStats and php5?
    Otherwise any one can suggest me another module like AdvStats?
    Thank you.
    Fil
  • I would recommend the statistics v8 module. Advstats is very old and AFAIK has not been updated in quite a while.

    statistics v8 should work on all .76+ flavors. I haven't tried it in .8 yet.

    The developer is on hiatus from postnuke (website says to checkback in two weeks, but its been two years) but the package hasn't had any errors I'm aware of.

    It does require the database maintainance as the tables for the stats file can be huge if you leave them too long on a busy site (it, 50,000 page views a month leads to 50MB tables after 4-5 months).

    This thread had a few links for the module:

    http://community.postnuke.com/module-Forum-viewtopic-topic-44378.htm

    NCM
    UHEweb

    PS once installed, disable the core stats module as its database intensive.
  • Thank you.
    I tried to install it but I0ve a problem in DB creation

    Unable to create the details table, error number: 1050, SQL: CREATE TABLE agenda_stats_details ( agenda_stats_details.pn_id int(8) NOT NULL auto_increment, agenda_stats_details.pn_key varchar(255) default '', agenda_stats_details.pn_host varchar(255) default '', agenda_stats_details.pn_requrl varchar(255) default '', agenda_stats_details.pn_http_referer varchar(255) default '', agenda_stats_details.pn_ip varchar(15) default '', agenda_stats_details.pn_hostip varchar(99) default '', agenda_stats_details.pn_os varchar(15) default '',.....

    Have I to try with the manual installation?
    Thank you.

    Fil
  • There is a small fix noted in that other post:

    Code

    To correct you need to change lines 81 and 114 which if not corrected will give you an error 1103.

    line 81 should read $stats_summarycolumn[host] varchar(255) default '',
    line 114 should read $stats_archivecolumn[host] varchar(255) default '',

    Also at least on my install, you're right at around line 283 on includes/pnAPI.php to add the line for activating the collecting of data. See the README.html for further instructions.


    Perhaps this is the issue?

    I've never had a problem with it, but I got my copy from the original developer quite some time ago.

    NCM
    UHEweb

    EDIT - just checked the download that works from that thread, and line 81 and 114 as noted above ARE incorrect and need to be fixed.



    edited by: uheweb, May 25, 2007 - 02:53 AM
  • Above all thank you.
    Maybe I'm wrong, but the 1050 error isn't something about existing tables? I think that at the first try the module created the tables and now it can do it again, and so I've this problem. I tried hacking the pninit.php and making something like this

    $SQL = "DROP TABLE IF EXISTS $pntable[stats_details];
    CREATE TABLE $stats_detailstable (
    $stats_detailscolumn[id] int(8) NOT NULL auto_increment,

    But now I have a 1064 error (maybe a syntax one?)
    What I can't understand is why if the tables exist I can't activate the module. Have I to change the includes/pnAPI before initializing? In the readme file I read that I can initialize and activate the module before hacking the pnAPI file. Maybe I have to drop the tables and try it again (do you know if there is a modulo that let you operate on the DB?)
    Any help?
    Thank you in advance.

    Fil



    edited by: Filippo73, May 25, 2007 - 11:45 AM
  • The first time you ran the script, some tables were created, others were not.

    The init script terminated with the module NOT initialized.

    Enter the module administration and click REMOVE. Then regenerate, then re-initialize (after making changes to the init script as indicated and removing your hacks). The REMOVE function should drop all tables that the module uses if they exist.

    This should clear out any tables that did install, and allow you to re-initialize.

    I've ran into this setting up init scripts for my own custom modules - init doesn't complete, yet you have some of the tables created and sub-sequent initializations will not work.

    NCM
    UHEWEb



    edited by: uheweb, May 25, 2007 - 09:43 AM
  • I tried to, but I've got the following problem

    "Unable to drop the summary table, error number: 1051. Unable to drop the archive table, error number: 1051."

    Any other idea?

    Thank you
    Fil
  • You can use myPHPadmin to drop the tables manually.

    These are the tables:

    pn_stats_archive
    pn_stats_details
    pn_stats_reports
    pn_stats_summary

    Of course, you'll need to replace "PN" with whatever prefix you use.

    Have you looked at the database directly?

    NCM
    UHEweb
  • Above all thank you again.
    I tried to drop the tables manually before my last post. What is really strange is that even if when I remove the module I have a 1051 mistake (unable to drop...) when I look into the DB there aren't the tables.
    At the same time I've the same problem when I try to install the module. The error code is 1051 (unable to create...) but the tables are not in the DB!!!Maybe a poltergeist icon_wink ?
    Thank You.

    Fil
  • Ouch. That is a strange one. Is this on an accessible server? Perhaps you'd like someone to take a look?

    Sounds like you're comfortable in phpMyAdmin, so I don't know why tables that don't show there would trigger an error in the module.

    Are you able to install any other module? Or is it merely this one? Perhaps its a permission problem with your DB user?

    NCM
    UHEweb
  • OK just a last question otherwise if you want I can create an admin account for you.
    I was trying to create tables manualli via phpMyAdmin, but I have an error on my syntax, can be this one the problem? The module doesn't create automatically two tables i.e. xxx_stats_archive and xxx_stats_summary. In this way I can understand why there is an error message when I try to remove them.
    Maybe I made a mistake in correcting the pninit file... a part of it looks like this

    $SQL = "CREATE TABLE $stats_detailstable (
    $stats_detailscolumn[id] int(8) NOT NULL auto_increment,
    $stats_detailscolumn[key] varchar(255) default '',
    $stats_detailscolumn[host] varchar(255) default '',
    $stats_detailscolumn[requrl] varchar(255) default '',
    $stats_detailscolumn[http_referer] varchar(255) default '',
    $stats_detailscolumn[ip] varchar(15) default '',
    $stats_detailscolumn[hostip] varchar(99) default '',
    $stats_detailscolumn[OS] varchar(15) default '',
    $stats_detailscolumn[browser] varchar(15) default '',
    $stats_detailscolumn[uname] varchar(25) default '',
    $stats_detailscolumn[uid] int(4) default '0',
    $stats_detailscolumn[sessionid] varchar(64) default '',
    $stats_detailscolumn[postdata] varchar(255) default '',
    $stats_detailscolumn[browserdata] varchar(255) default '',
    $stats_detailscolumn[count] smallint unsigned default '0',
    $stats_detailscolumn[timestamp] datetime NOT NULL,
    $stats_detailscolumn[summary_timestamp] datetime NOT NULL default '0000-00-00 00:00:00',
    PRIMARY KEY(pn_id),
    INDEX `timestamp` (`pn_timestamp`),
    INDEX `username` (`pn_uname`),
    INDEX `sessionid` (`pn_sessionid`)
    )";

    Is it OK? icon_confused
    If I (You) find the mistake in this code maybe I can patch the other table too.
    I have no problems with other modules and I installed several of them (PagEd - AdvStats - FormExpress - ...)
    Thank you again.

    Fil
  • I would try it with the original one, and just the couple changes noted above - lines 81 and 114.

    Also, you could zip up your files and post them for download. I can compare with my copy to see if other changes exist that shouldn't.

    NCM
    UHEweb
  • I tried with the original one (I hope it is) and with the changes noted above, but no way.
    How can I post the zip file?
    Thank you.
    Fil
  • Just post it to your webserver in an empty folder and send the URL.

    I'll take a look.

    NCM
    UHEweb
  • 0 users

This list is based on users active over the last 60 minutes.