Well thx unfortunately
I just get
<?php
phpinfo();
as an output
Well thx unfortunately
I just get
<?php
phpinfo();
as an output
Hi,
Did you name the file something.php?
well kinda
php.txt let me try a fantasy name
It needs a .php file extension
ok well that’s me.
Build Date | May 14 2020 09:11:51 |
---|---|
Server API | Apache 2.0 Handler |
Virtual Directory Support | disabled |
Configuration File (php.ini) Path | /etc/php/7.0/apache2 |
Loaded Configuration File | /etc/php/7.0/apache2/php.ini |
Scan this dir for additional .ini files | /etc/php/7.0/apache2/conf.d |
Still the error message is
To run Matomo you need at least PHP version 7.2.5
Unfortunately it seems your webserver is using PHP version 7.0.33-29+0~20200514.36+debian9~1.gbp126f6f.
php -v says 7.4 though
Hi,
It looks like your webserver is using php7.0.
Keep in mind that php for your webserver and php-cli on the commandline is separate.
Sure
any idea how to put the webserver to 7.4 or where its determined which php to use?
Hi,
If you use nginx change the line that looks like fastcgi_pass unix:/var/run/php/php7.4-fpm.sock
. I don’t know Apache, so I can’t help you there.
thx still a filename would be helpful
On Terminal I get
php -i | grep “Loaded Configuration File”
Loaded Configuration File => /etc/php/7.4/cli/php.ini
Hi,
I don’t know your webserver setup, so it is hard to give specific tips. The person that set up PHP on your server can probably help more.
Matomo doesn’t choose the PHP version, but the other way round: You set up your webserver (e.g. Apache) to a PHP daemon of your choice (e.g. php-fpm or php-apache). So to make sure Matomo runs with the right PHP version, you need to make sure your webserver forwards php requests to the right php daemon.
Hi Lukas, thx
I know that but where do I find the file which determines apache cli config if
Loaded Configuration File => /etc/php/7.4/cli/php.ini ist not the cli config file.
I’m not a sys admin, I have about 4 years in different set ups on linux server plus desktop.
Hi,
When you call php from the command line it executes php-ini which as you can see is set up correctly to use php 7.4.
I unfortunately have never used Apache before, so I can’t help you at all there, but I’d recommend you too look through all files in /etc/apache2/
to maybe find a line that specifies the php executable.
Maybe this also helps:
Hi Lukas
output on
rpm -qa | grep php is nill
I have
php 7.0
php 7.2
php 7.3
php 7.4
in /etc/apache
neither do I have /etc/httpd
Hi there,
same issue here since the last MAtomo update to V.4
I was using Php 7.3.xx
and I updated to 7.4, I still have the same Cron Issue from Plesk :
Error in Matomo: To run Matomo you need at least PHP version 7.2.5 Unfortunately it seems your webserver is using PHP version 7.0.33-0ubuntu0.16.04.16. Please try to update your PHP version, Matomo is really worth it! Nowadays most web hosts support PHP 7.2.5.
I checked my Php version from the server, I put also a phpinfo in MAtomo folder, I have the right php Version (7.4)
I removed and re dreated my cron task, same issue.
I updated Matomo to the latest version 4.05
In my Matomo admin account I can read
Matomo version : 4.0.5
MySQL version : 10.1.48-MariaDB-1~xenial
PHP version : 7.4.13
Defintely I think this issue is coming from the last update.
Something goes wrong in some updated files of Matomo.
So … I’m waiting for an update ?
Thank you for your help.
Philippe.
Hi,
Interestingly you have the exact oposite issue as @arnego2. In your case the webserver properly uses the correct PHP version (as you confirmed with the phpinfo file) and therefore the Matomo UI should be working fine.
But the cronjob is failing due to that error and this is because php-cli is completly separate. So you need to check your crontab and see which php binary you use to call /console and check if it is also PHP 7.4
Hi Lukas,
before te Matomo Update to v4.0 I was using the same Cron task, on same server with same binary.
I changed nothing.
So you mean before V4.0 the cron task could use a PHP version equal to 7.0.33 ?
Because I dont know where I can check this Php-cli version ?
Hi,
Matomo 3 supported PHP 5.6+, so you wouldn’t have noticed if the archiving was using the “wrong” PHP version.
Check your crontab. For me the command looks like this
0 * * * * www-data /usr/bin/php7.3 /var/www/matomo/console core:archive
Depending on your server setup and operating system this might look different, but nevertheless it should specify which program executes the command.
Ok, thanks Lukas,
my Cron is completely different :
/usr/bin/php /var/www/vhosts/mywebsite.xyz/httpdocs/matomo/console core:archive --url=https://mywebsite.xyz/matomo/ > /dev/null
I will try your version and let you know.
My version will not work as is on your system
Check which PHP version /usr/bin/php
is (e.g. via /usr/bin/php --version
)
You’re right !
In my folder /usr/bin/ I have only php7.0
So I need to upload the 7.4 binary file.