/bin/sh: /opt/alt/phpWAR/usr/bin/php: No such file or directory

Helllo,

I’ve recently started having problems with one existing Matomo install. It’s been running fine for about five years. It seems to have started when I updated to php7.4 from 7.2. Reverting to 7.2 does not seem to have fixed the issue. The Matomo version is the latest 3.14.1.

I use the default archiving as it’s a very low traffic site. Matomo sends me the following error email every hour from the Cron Daemon:

/opt/alt/phpWAR/usr/bin/php /home/terraner/public_html/piwik/console core:archive --url=http://[snipped]/piwik/ > /dev/null from (Cron Daemon)

the message is:

/bin/sh: /opt/alt/phpWAR/usr/bin/php: No such file or directory

Any help on how to fix this would be most appreciated. I’m just a website designer, so troubleshooting this stuff is quite above knowledge level.

Thanks!

Hi,

This is your server telling you that /opt/alt/phpWAR/usr/bin/php: does not exist, but you said that it should use this file to run the archiving. So edit the cronjob to use the correct PHP executable. Which one it is depends on how you have set up your server. If you are not maintaining the server yourself, I’d recommend to contact your host.

1 Like

Hi Lukas,

Thanks for your prompt reply!

Perhaps I wasn’t being clear enough - I am not using a cronjob. I have always been using the “Archive reports when viewed from the browser” option, and have never set up a cronjob. I understood that the message meant the file did not exist, but do not understand why I suddenly started getting this message when I hadn’t changed any settings in Matomo on or on the server.

Is there anything I can do to get the behavior back to normal (with no error email message sent hurly) using the “Archive reports when viewed from the browser” option which had been working fine?

Hi,

But the mail you are getting is coming from cron and is trying to run the archiving on the commandline.

1 Like

Thanks Lukas, that made me understand that the Cronjob was not being generated by Matomo. Apparently it was created by the Softalcious app installer on my hosting which I used to install Matomo on this account. I turned off backups, deleted the Cronjob, and re-set up the backups, and that problematic Cronjob was not recreated. Hopefully that will solve the problem.