We have an issue that the statistic article does not show any count since 25 Dec '20. I have tried everything to solve the issue (using acron, using cron, moving logfiles to stage folder) but it did not solve the problem.
Tonight, I am trying to use Cron again as it states here Statistics (sfu.ca), and the Cron job massage is “Parse error: syntax error, unexpected ‘version’ (T_STRING) in /home/adeputra23/public_html/myjurnal/plugins/generic/usageStats/scheduledTasks.xml on line 1”, the error_log did not record any about this eror.
With a correctly formulated PHP command line (or PHP web bindings, if folks see this outside of the command line), the short_tag_open option shouldn’t matter.
Now I am checking the ScheduledTaskLogs folder for the last log that appearing the statistic (26 Dec 2020). Here is the result
[2020-12-25 20:32:14] https://myjurnal.poltekkes-kdi.ac.id
[2020-12-25 20:32:14] [Notice] Task process started.
[2020-12-25 20:32:17] [Error] Error: can’t execute “”. Check your gzip setting in config.inc.php.
[2020-12-25 20:32:17] [Notice] File /home/adeputra23/myjurnal/usageStats/processing/usage_events_20201224.log was processed and archived.
[2020-12-25 20:32:17] [Notice] Task process stopped.
Then, from the same folder, I checked for most-viewed log
[2021-01-14 02:27:52] JURNAL ONLINE POLTEKKES KEMENKES KENDARI
[2021-01-14 02:27:52] [Notice] Task process started.
Also note that both of these are running every minute, which is more frequently than necessary.
On the other hand, seeing scheduledTaskLogs entries such as:
[2020-12-25 20:32:17] [Notice] File /home/adeputra23/myjurnal/usageStats/processing/usage_events_20201224.log was processed and archived.
suggests that something is running (or was previously running) the usage statistics task. This is likely the “acron” plugin. Do you have that plugin enabled?
The error:
[2020-12-25 20:32:17] [Error] Error: can’t execute “”. Check your gzip setting in config.inc.php.
Suggests that you are missing this setting in config.inc.php, in the [cli] section:
; gzip
gzip = /bin/gzip
This would need to point to the correct path to this “gzip” executable on your server.
I found this from error_log, this since the Article Stats did not display any count
[24-Dec-2020 20:27:36 UTC] PHP Deprecated: Non-static method Core::removeBaseUrl() should not be called statically in /home/adeputra23/public_html/myjurnal/plugins/generic/usageStats/UsageStatsLoader.inc.php on line 767
[24-Dec-2020 20:27:36 UTC] PHP Deprecated: Non-static method Core::_getBaseUrlAndPath() should not be called statically in /home/adeputra23/public_html/myjurnal/lib/pkp/classes/core/Core.inc.php on line 231
Dear community, I have applied a solution to this problem.
I did these ways:
Turning the PHP settings to default;
Enabled the Acron plugin
Applying the Cronjob for usageStats using this code /usr/local/bin/php /home/journal/public_html/{your_dir}/tools/runScheduledTasks.php /home/journal/public_html/{your_dir}/plugins/generic/usageStats/scheduledTasks.xml
Move the files from the Stats folder to Stage every day