I have this journal, https://docomomoiberico.com/revista-ram/index.php, since about a year ago and it have never displayed Statistics in the Dashboard. Last monday we released the first number of the journal and, I’m afraid, this is becoming a problem since then, we need the statistics.
I have read like a dozen posts about this issue, but despiste of that I couldn’t solve the problem.
The version of OJS is 3.3.0.14.
Server is Apache, the version of PHP is 8.1.28
The Acron plugin is enabled.
The statistics plugin is enabled by default and has the default settings.
I’ve checked the scheduled_tasks table in the database, I paste a screenshot:
Trough the FTP I can see that some logs are being created each day in the folder usageEventLogs, there are not any other folder under usageSats, neither stage, nor archive or rejected. Does it mean that statistics data is saved but not processed?
I don’t know where else look for an error, I’d apreciate some community help.
If there is any way of processing the logs manually it would work for us, a weekly or even fortnihtly report may be enough.
You could try if the solution also applies to you. That would be:
in plugins/generic/usageStats/scheduledTasksAutoStage.xml (or which applies to you) remove the line <frequency hour="0"/> if present
in shell execute: php tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasksAutoStage.xml (adjust paths to your setup)
I created a cron job to do it for me then.
Thank you, I will try your solution but at this moment I have not shell access, I have asked to active SSH and execute those files trough there.
I have checked the scheduledTaskLogs/ and is like yours, task started/task stopped in the very same minute.
So, let me understand, executing that file I may enforce the process, right?
I deleted the comment because I’m working on it, trying to execute php
Let me ask some, if the logs are being saved in the folder usageEventLogs the usage dta is being collected, right? I mean, even if it takes me a month to solve the statics are there, though unprocessed.
should be safe. the only thing is processing could be taking some time (in some places php get’s killed after 5min, so it could take multiple runs). Also would be better to hold off major changes of your site (such as OJS upgrades, changes of hostnames) till you process them.
Hi there @kikeconk …
Back in the day we faced a similar problem … we solved it by moving the log files to the stage folder and then executing the cron task to process them:
So, if I have understood right, I should copy a couple or three logs from usageEventLogs to stage and then execute the second command, the php command.
I have done it and nothing occurs. I have tried from the OJS folder and also from the root folder, with the log route.
Just in case, in the Statistics plugin I have tried to change line to bars diagram and nothing happens, line graphic with no visits keep being dosplayed. Just in case this might be a tip.
Just because I’m trying like anything, some probably making no sense, I have also executed the first command, the move command, and it worked, every log file was moved from usageEventLogs to stage.
I know that is obvious, but it serve to me to check I’m executing those orders in the right “place”, as lon as I’m not super familiarised with shell or SSH.
Just to clarify … I take you are changing the paths to reflect your OJS installation. I mean … you change the “/var/www/ojs3files/” part to wherever your actual ‘files_dir’ variable points to
Yes, that’s what I meant in the previous post, I have changed the paths, wrote my paths, and as long as the mv command did work I guess I am doing it right.
Just a note that it’s dangerous to have your files directory inside the web root! Make sure your files directory is kept safe from direct access through the web server, or you risk getting hacked. See the notes on files_dir in config.inc.php.
Regards,
Alec Smecher
Public Knowledge Project Team