OJS3: issues with usage statistics plugin with php7.0

Greetings,

As I am testing OJS3 work process with different php versions, I have noticed that user statistics plugin is not working properly on php7.0. With php 5.6 statistics data was updated every day on regularly basis. But it is not the case on php7.0 module despite of generated logs in ojs files directory.
Another case is that OJS3 is completely not working with php7.1 (with all needed php7.1 modules installed). After switching php version to 7.1 main page contains only html and all links incuding dashboard are broken (500 error). I see really huge error log list but really not particularly that could cause such problems.

Hi @Vitaliy,

Try noting the exact time when you make a request, and then checking the error log for timestamps that correspond. That’ll help pick the relevant entries out of a long error log. Something should always be logged with a 500 error.

Regards,
Alec Smecher
Public Knowledge Project Team

Greetings,

And as for usage statistics plugin? Can I update statistics charts by force to see where is the problem?

I think in my case plugin is simply not updating information in the statistics chart (plugin logs in ojs files directory are successfully updating).
Also I am not seeing emails about “Usage statistics file loader task” after switching from php5.6 to php7.0. Another notifications are sent like before.

I have also noticed that in my database records in table usage_charts_temporary_records are not updating since switching to php7.o I am start to think that problem is not in php version, but in mysqli connector.

Hi @Vitaliy,

The usage_stats_temporary_records table will only contain records while the usage log files are being processed.

What you might want to check is the metrics table. If the log files are getting into the archived folder, under usageStats directory, and the metrics table is not increasing in number of records, than something is really wrong.

About not working with PHP 7, I really didn’t tested OJS with that yet, and I am afraid I can’t help much you there. But I can try to help you debugging, and the first thing I would check is the one I commented above.

Cheers,
Bruno

Thanks for the reply,

in table “metrics” I see the same story. The last record is from 7th October.
As for folders:
archive - the last log file is from 1 October.
reject - from 2 to 7.
processing and stage - empty.
usageEventsLogs - from 8 to 12 October.

executing command:

sudo php tools/runScheduledTasks.php lib/pkp/plugins/generic/usageStats/scheduledTasksAutoStage.xml

I see only PHP warnings:

PHP Warning:  Declaration of OrcidProfilePlugin::getTemplatePath() should be compatible with Plugin::getTemplatePath($inCore = false) in .../public_html/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php on line 413
PHP Warning:  Declaration of BrowsePlugin::manage($verb, $args, &$message, &$messageParams, &$pluginModalContent = NULL) should be compatible with Plugin::manage($args, $request) in .../public_html/plugins/generic/browse/BrowsePlugin.inc.php on line 162
PHP Warning:  Declaration of BrowsePlugin::getTemplatePath() should be compatible with Plugin::getTemplatePath($inCore = false) in .../public_html/plugins/generic/browse/BrowsePlugin.inc.php on line 162
PHP Warning:  Declaration of PdfJsViewerPlugin::getTemplatePath() should be compatible with Plugin::getTemplatePath($inCore = false) in .../public_html/plugins/generic/pdfJsViewer/PdfJsViewerPlugin.inc.php on line 136
PHP Warning:  Declaration of WebFeedPlugin::getTemplatePath() should be compatible with Plugin::getTemplatePath($inCore = false) in .../public_html/plugins/generic/webFeed/WebFeedPlugin.inc.php on line 190
PHP Warning:  Declaration of LensGalleyPlugin::getTemplatePath() should be compatible with Plugin::getTemplatePath($inCore = false) in .../public_html/plugins/generic/lensGalley/LensGalleyPlugin.inc.php on line 157
PHP Warning:  Declaration of GoogleAnalyticsPlugin::getTemplatePath() should be compatible with Plugin::getTemplatePath($inCore = false) in .../public_html/plugins/generic/googleAnalytics/GoogleAnalyticsPlugin.inc.php on line 147
PHP Warning:  Declaration of RecommendByAuthorPlugin::getTemplatePath() should be compatible with Plugin::getTemplatePath($inCore = false) in .../public_html/plugins/generic/recommendByAuthor/RecommendByAuthorPlugin.inc.php on line 156

Then I have copied log files in the “stage” folder from usage stats and executed 2 other commands:

sudo php tools/runScheduledTasks.php lib/pkp/plugins/generic/usageStats/scheduledTasksExternalLogFiles.xml
and
sudo php tools/runScheduledTasks.php lib/pkp/plugins/generic/usageStats/scheduledTasks.xml

after this I see the same thing but plus fatal error:

PHP Fatal error: Cannot redeclare geoip_country_code_by_name_v6() in .../public_html/lib/pkp/plugins/generic/usageStats/lib/geoIp/geoip.inc on line 430

Interesting, but switching back to php5.6 does not solve the problem.

@Vitaliy,

It seems like you have duplicated files for that particular library. Can you double check that you only have one geoip.inc file inside your entire OJS folder?

Thanks,
Bruno

@beghelli,

Yes. I have only one such file. Checked by Ubuntu search.
Also I receive emails from Posfix in var/mail/root after executing task loader:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/bcmath.so' - /usr/lib/php/20160303/bcmath.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/bz2.so' - /usr/lib/php/20160303/bz2.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/curl.so' - /usr/lib/php/20160303/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/dba.so' - /usr/lib/php/20160303/dba.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/enchant.so' - /usr/lib/php/20160303/enchant.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/gmp.so' - /usr/lib/php/20160303/gmp.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/imap.so' - /usr/lib/php/20160303/imap.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/interbase.so' - /usr/lib/php/20160303/interbase.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/intl.so' - /usr/lib/php/20160303/intl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/ldap.so' - /usr/lib/php/20160303/ldap.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/mcrypt.so' - /usr/lib/php/20160303/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/odbc.so' - /usr/lib/php/20160303/odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_dblib.so' - /usr/lib/php/20160303/pdo_dblib.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_firebird.so' - /usr/lib/php/20160303/pdo_firebird.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_odbc.so' - /usr/lib/php/20160303/pdo_odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_pgsql.so' - /usr/lib/php/20160303/pdo_pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_sqlite.so' - /usr/lib/php/20160303/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pgsql.so' - /usr/lib/php/20160303/pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pspell.so' - /usr/lib/php/20160303/pspell.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/recode.so' - /usr/lib/php/20160303/recode.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/snmp.so' - /usr/lib/php/20160303/snmp.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/soap.so' - /usr/lib/php/20160303/soap.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/sqlite3.so' - /usr/lib/php/20160303/sqlite3.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/tidy.so' - /usr/lib/php/20160303/tidy.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/xmlrpc.so' - /usr/lib/php/20160303/xmlrpc.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/zip.so' - /usr/lib/php/20160303/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/curl.so' - /usr/lib/php/20160303/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/dba.so' - /usr/lib/php/20160303/dba.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/enchant.so' - /usr/lib/php/20160303/enchant.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/gmp.so' - /usr/lib/php/20160303/gmp.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/imap.so' - /usr/lib/php/20160303/imap.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/interbase.so' - /usr/lib/php/20160303/interbase.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/intl.so' - /usr/lib/php/20160303/intl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/ldap.so' - /usr/lib/php/20160303/ldap.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/mcrypt.so' - /usr/lib/php/20160303/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/odbc.so' - /usr/lib/php/20160303/odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_dblib.so' - /usr/lib/php/20160303/pdo_dblib.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_firebird.so' - /usr/lib/php/20160303/pdo_firebird.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_odbc.so' - /usr/lib/php/20160303/pdo_odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_pgsql.so' - /usr/lib/php/20160303/pdo_pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_sqlite.so' - /usr/lib/php/20160303/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pgsql.so' - /usr/lib/php/20160303/pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pspell.so' - /usr/lib/php/20160303/pspell.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/recode.so' - /usr/lib/php/20160303/recode.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/snmp.so' - /usr/lib/php/20160303/snmp.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/soap.so' - /usr/lib/php/20160303/soap.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/sqlite3.so' - /usr/lib/php/20160303/sqlite3.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/tidy.so' - /usr/lib/php/20160303/tidy.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/xmlrpc.so' - /usr/lib/php/20160303/xmlrpc.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/zip.so' - /usr/lib/php/20160303/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/curl.so' - /usr/lib/php/20160303/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/dba.so' - /usr/lib/php/20160303/dba.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/enchant.so' - /usr/lib/php/20160303/enchant.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/gmp.so' - /usr/lib/php/20160303/gmp.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/imap.so' - /usr/lib/php/20160303/imap.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/interbase.so' - /usr/lib/php/20160303/interbase.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/intl.so' - /usr/lib/php/20160303/intl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/ldap.so' - /usr/lib/php/20160303/ldap.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/mcrypt.so' - /usr/lib/php/20160303/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/odbc.so' - /usr/lib/php/20160303/odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_dblib.so' - /usr/lib/php/20160303/pdo_dblib.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_firebird.so' - /usr/lib/php/20160303/pdo_firebird.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_odbc.so' - /usr/lib/php/20160303/pdo_odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_pgsql.so' - /usr/lib/php/20160303/pdo_pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_sqlite.so' - /usr/lib/php/20160303/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pgsql.so' - /usr/lib/php/20160303/pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pspell.so' - /usr/lib/php/20160303/pspell.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/recode.so' - /usr/lib/php/20160303/recode.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/snmp.so' - /usr/lib/php/20160303/snmp.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/soap.so' - /usr/lib/php/20160303/soap.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/sqlite3.so' - /usr/lib/php/20160303/sqlite3.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/tidy.so' - /usr/lib/php/20160303/tidy.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/xmlrpc.so' - /usr/lib/php/20160303/xmlrpc.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/zip.so' - /usr/lib/php/20160303/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0 

I really have not got such files in php directory

Installing all those extensions didn`t change anything

@beghelli,

Did not know much about php, but you reply gave me an idea to delete php-geoip module. After this and after a command:

php tools/runScheduledTasks.php lib/pkp/plugins/generic/usageStats/scheduledTasks.xml

Finally files in “stage” folder had processed and all data went to database. So there is some incompatibility issues with geoip php module.

While logs were processing I received following strange warnings and fatal error that seems not influenced to final result:

PHP Warning:  preg_match(): Delimiter must not be alphanumeric or backslash in .../public_html/lib/pkp/classes/core/PKPString.inc.php on line 342
PHP Warning:  Declaration of PublishedArticleDAO::getBySetting($settingName, $settingValue, $journalId = NULL) should be compatible with ArticleDAO::getBySetting($settingName, $settingValue, $journalId = NULL, $rangeInfo = NULL) in .../public_html/classes/article/PublishedArticleDAO.inc.php on line 800
PHP Fatal error:  Uncaught Error: Using $this when not in object context in .../public_html/lib/pkp/classes/i18n/PKPLocale.inc.php:111

It needed to point out that analog command ....sheduledTasksAutoStage still not working (but with no fatal errors). Logs were not moved to stage folder.

@Vitaliy,

It seems you already had in your server the GeoIp extension installed somewhere then, removing that stopped php trying to load twice the same code. Can you check if your metrics table has any geolocation data? If yes, then this problem is solved.

Auto stage will only stage files that are not from the current day, make sure you have more than the current day file on the usageEventLogs folder to test it.

I am not sure about the fatal error. If you are not receiving any email from the usage statistics file loader scheduled task anymore, then I would start to debug that part of the code. I think it uses the PKPLocale class.

Cheers,
Bruno

@beghelli,

Nope. Have not got any geolocation data in my metrics table. Not from past, nor from new records.

Auto stage is not working despite presents of logs for several days in usageEventLogs folder.

And as for usage statistics scheduled tasks, in this process involves acron plugin? Can i somehow check if it works? I see that it is activated but not sure if it really does the job.
For now I cannot make this process automatic with cron because of described problem with auto staging.

@Vitaliy,

Did you downloaded the geo location data that’s necessary for the geo location to work? If not, check the Stats Migration part of this document: ojs/UPGRADE at ojs-stable-2_4_8 · pkp/ojs · GitHub

The acron plugin should be enabled by default. It triggers the usage statistics task, but if you call that manually, it should also work (also with auto staging).

Can you make sure that the user that runs the PHP process in your server has permissions to read and write on all usage stats folders?

Cheers,
Bruno

Greetings @beghelli,

My all usage stats folders have permissions for www-data to read and write. It has not been changed from start of the September and stats processing is not working only for a week.
All tasks I checked with sudo. It throws an error if not (something like permission is denied).

For now I am trying to automize process with cron and rsync. My aim is to process stat logs every 2 hour. I do next steps:
sudo crontab -e
0 */2 * * * /usr/bin/rsync -a /full/path/to/usageEventLogs/ /full/path/to/stage - dir1 with “/” at the end
0 */2 * * * php /full/path/to/runScheduledTasks.php /full/path/to/scheduledTasks.xml

I am not very experienced in cron and do not know whether there is a need to put sudo in front of those commands in crontab.

As for downloading geo location data, I will check it in near time.

Thanks for a reply.

Each user on the system can have it’s own crontab. For OJS tasks, you will want cron to run as your web user - for example, “apache”, “www” or “nobody”.

If you have been running sudo crontab -e, you are probably running cron as root. This can cause files to be created or changed as root, and make it impossible for your web user to manipulate the files later.

I would recommend checking your files_dir to ensure all files and directories are owned and readable/writable to the web user, and then switching the crontab to the web user. For example, to edit the ‘apache’ user’s crontab:
sudo crontab -e -u apache

1 Like