Best Version of php to use with Matomo

Hi, which is the best version of php to use on my website with Matomo?

Hi,

The newer the better (as every update brings performance improvements), but 7.2 hasn’t been tested that much, so I’d say 7.1 or 7.0.

Hi thanks for that. I’m having problems changing to php 7.1 and 7.0 so
instead I have created a php.ini file and it I’m not sure exactly where it needs to go.
I have put the following code into the php.ini file:

always_populate_raw_post_data=-1

Where should this file go?

This is not how this works. :wink:

Do you use a shared host?
If yes: Ask your host about changing this, because you can mostlikely don’t change it on your own.
If no: Are you running PHP in fpm mode?
If yes: Edit the php.ini under /etc/php/5.6/fpm/php.ini
If no: Edit the php.ini under /etc/php/5.6/apache2/php.ini

Yes I use a shared host.

Yes it seems that I have to use php 5.6 because a plugin may need
the earlier version of php.

If I disable a plugin and then change the php I might get the white
screen as I did when trying the php 7.0 and will then have to contact the web host to fix it. It seems that this will be a time consuming way to check all the plugins.

Why can’t I use the php.ini file with the message on it as it is saying to do in
the matomo installation page?

I don’t know what fpm mode is.

The problem with the php.ini is that you need to restart the php server (fpm) or webserver (apache2) and that is not possible in shared enviroment.

I see.

Seeing as it’s shared hosting, what exactly do I ask the host to change?

You ask him to set always_populate_raw_post_data=-1 for you.