I have a problem with the e-mail reports. The manual sending of reports via Matomo interface works, but the automatic sending via Archive Cron Job does not work.
Log:
INFO [2018-11-01 15:42:31] 79180 Scheduler: executing task Piwik\Plugins\ScheduledReports\API.sendReport_29...
sh: 1: -t: not found
INFO [2018-11-01 15:42:53] 79180 Scheduler: finished. Time elapsed: 22.156s
Anyone have any idea what this might be about?
Thanks,
Markus
Matomo version: 3.6.1
MySQL version: 10.0.36-MariaDB-0+deb8u1
PHP version: 7.2.11
Many thanks for your report. I feel like you are very close to helping us solve a larger bug.
I have been getting many reports of people not able to to send reports via cron, but had no way to reproduce it.
Therefore I have a few questions:
Can you check the PHP error log to find out which line in which PHP file is exactly causing the issue?
Can you provide more details to which operating system your server is using?
Can you report back what the response of df -t nfs on the shell would be?
this is the only place in Matomo I could find a -t parameter.
It seems that for whatever reason PHP doesn’t know the path to sendmail and therefore executes -t -i instead of sendmail -t -i. So the error lies even outside of Matomo, but in PHP itself.
Chances are that php-cli has a different php.ini which is missing the correct configuration.
# statistics @ eda01 in ~ disk:28% [14:09:37]
$ /opt/php/php72/bin/php -i | grep sendmail
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i
Path to sendmail => /usr/sbin/sendmail -t -i
# statistics @ eda01 in ~ disk:28% [14:09:39]
$ /usr/sbin/sendmail --version
msmtp version 1.4.32
Platform: x86_64-pc-linux-gnu
TLS/SSL library: GnuTLS
Authentication library: GNU SASL
Supported authentication methods:
plain scram-sha-1 cram-md5 external digest-md5 login ntlm
IDN support: enabled
NLS: enabled, LOCALEDIR is /usr/share/locale
Keyring support: none
System configuration file name: /etc/msmtprc
User configuration file name: /home/statistics/.msmtprc
Copyright (C) 2014 Martin Lambers and others.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
But we use msmtp instead of sendmail, which has always been compatible.
Another Question: Now temporarily downgraded to php5. So everything works as usual. However, the October monthly reports were not sent. How can I repeat the e-mail transmission? Can I somehow mark the reports as “not sent” in the database?