Views and download of articles are not counted anymore since upgrade OJS 3.1.2

Hi @ctgraham,

I had already looked for an occurrence of “geoip.inc” but I did it again. I have the same results as you.
I kept looking. I found that the error occurs in this file:
/ojs_home/plugins/generic/usageStats/lib/geoIp/geoipcity.inc
After this command line is executed:
require_once(‘geoip.inc’);
So I tried to comment the “require_once” command and no error occured!
Next I removed the entry in the DB table scheduled_tasks with the class_name = plugins.generic.usageStats.UsageStatsLoader
And then I ran again the command for autostaging, ant it worked!
All usage_events_*.log files were processed and metrics table updated.

But I can’t tell why “require_once” command doesn’t work and generates an error. And where the geoip.inc file is called on the first place.
I noticed that:
“geoip.inc” is called in “geoipcity.inc” and “benchmark.php” files
“geoipcity.inc” is called in “GeoLocationTool.inc.php” and “benchmark.php” files
“GeoLocationTool” is imported from several files
Maybe it’s my release of PHP but I upgraded to php7.0 on my debian jessie
Maybe it’s because I didn’t install patches for the OJS 3.1.2 release and I am still with the original release from the official website.
Maybe I have a specific plugin which interfers with the statistic plugin
I will wait for the next release OJS/OMP 3.1.2-1 and will see if the problen is still there

Best regards.
Helene

Are you using PHP 7.0 or one of the PHP 7.x releases like PHP 7.1, 7.2, or 7.3? PHP 7.0 is at end of life, so if it is a PHP 7.0 bug, there isn’t any official support for it. I’m not aware of any OJS changes which would be relevant, except for the relocation of the usageStats plugin, as described earlier. A very odd situation.

Hello again @ctgraham,
If I find something I will let your know.
Helene

Hi @ctgraham,

I think I found the problem,

When I upgraded to php7.0 my Debian Jessie, I followed a documentation and I installed other php7.0 packages including php7.0-geoip package.
And it was the cause of the problem. When I removed this package, the problem was solved and the following error no longer appeared:
PHP Fatal error: Cannot redeclare geoip_country_code_by_name_v6() in /ojs_home/plugins/generic/usageStats/lib/geoIp/geoip.inc on line 430

Kind regards
Helene

2 Likes

how about if there is no update data in /usagestats/archive? in my OJS 3.1.1.4 this is stop since dec 2019

To process usage statistics, the usage statistics plugin must be enabled, and either the Acron plugin must be enabled, or you must setup a system cron job to run the tasks described above.