OJS 3.3.0 is not displaying statistics

Hello, good morning,

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
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.

Thank’s a lot, I hope you can help me.


no so long ago I had a similar issue: OJS 3.3 - how do I enforce processing of (old) log files in usageEventLogs folder?. I just couldn’t get it to run automatically.

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?


Thats how I understand it. The docu mentions it among other things https://docs.pkp.sfu.ca/admin-guide/3.3/en/statistics#processes - though personally I find it not clear and other stuff did not work for me.


I had changed that file and executed that command trough SSH and I get this result:

I don’t really know what it means, but the statistics are not displayed yet.


the command is not exec but php.

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.

OK, I made it now, php wasn’t installed.

Though, it looks like nothing has happened:

The statistics are not displayed, in the scheduledTaskLogs doesn’t appear this manual attempt.

Any other idea?, thank you very much


just to be sure - did you remove the frequency line from the xml?

besides, the help I linked lists 3 approaches. you could try the other two. make sure to read the full section as it contains necessary details.

Yes, I did. I have tried also the other two approaches, with and without copying the logs in the stage folder.

Cause, the stage folder isn’t even been created, I did it manually.

I have tried, just in case, to downgrade to PHP 7.4, since I read so in other post, but nothing work.


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:

10 5 * * *      root    mv /var/www/ojs3files/usageStats/usageEventLogs/*.log /var/www/ojs3files/usageStats/stage/      
10 6 * * *      root    php /var/www/html/ojs3/tools/runScheduledTasks.php /var/www/html/ojs3/plugins/generic/usageStats/scheduledTasks.xml

You may want to move just a few log files to the “stage” folder (2 or 3) and test the second command, to see if it works.

Hi, thank’s,

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.

I have no idea what is happening.


Hmmm … that’s strange.
Do the log files you copied to the stage folder remain in that folder?

Yes, they remain there.

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.

1 Like

Hi all,

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.

Alec Smecher
Public Knowledge Project Team

Hello, @asmecher , thank’s,

I had a problema when I installed the OJS so I couldn’t place that folder outside of the main web folder, but it’s protected and hidden.

May this be the cause of my problem with Statistics?


Hi @kikeconk,

No, there shouldn’t be a problem processing statistics when the directory is placed inside the web root. Glad you’ve got it protected!

Alec Smecher
Public Knowledge Project Team