matomo-org / matomo-for-wordpress

Get a fully functioning Matomo Analytics for your WordPress. Star us on Github? +1. Matomo is the leading open alternative to Google Analytics that gives you full control over your data. Privacy is built-in. 100% data ownership, no one else can see your data. We love Pull Requests!
https://matomo.org
GNU General Public License v3.0
120 stars 25 forks source link

Matomo WP Plugin crashes WP hosted by IONOS (Internal Server error) #784

Open itsalexandersimon opened 1 year ago

itsalexandersimon commented 1 year ago

Dear All, Managed WordPress by IONOS; after installing and activating the WP Plugin, it appeared that my whole WP site was down (internal server errors).

With some patience and several reloads, I entered the Plugin directory and deactivated the Matomo WP Plugin. Now everything is back to normal.

On the Matomo Forum, I found reports related to WP 6.2 and PHP 8 - IONOS recently upgraded to WP 6.2 and PHP 8, so maybe it’s not a IONOS issue but rather an incompatibility with the current version of those two products.


The issues occurred right after activating the Matomo plugin. On the starting page, I saw a warning message (warning about PHP and MySQL - contradicting the diagnosis report below) and managed to copy the diagnosis output:

              # Errors

Matomo

Endpoints

Crons

Vorgeschriebene Prüfungen

Optionale Prüfungen

Matomo Settings

Logs

WordPress

WordPress Plugins

MU Plugins

Plugins

Server

PHP cli

Database

Browser

siegel-websites commented 1 year ago

same here. matomo isnt working since dec 22 with ionos

MatomoForumNotifications commented 1 year ago

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/internal-server-error-ionos/50358/8

mattmary commented 1 year ago

Hello @itsalexandersimon

The warning you get from the PHP Cli version might be due to an incorrect detection of the PHP Cli to use by our plugin (Some hosting providers have custom ways to set up the PHP Cli, and so, it leads to plugin errors).

I'm not sure it could explain the WordPress error you get: we would need more information from your PHP error log or your WordPress log files to be sure.

But to fix this PHP Cli detection problem, you have two approaches:

Those two approaches should solve the warnings you get in your system report.

If you still encounter some fatal issues in your back-office, please share with us your php error log and your wordpress log. (You can also email it at wordpress@matomo.org).

Kind regards

Mat

mattmary commented 1 year ago

Hello @siegel-websites @itsalexandersimon

We have another IONOS related issue: #778

With your system report, it seems that your hosting provider installs some custom plugins.

Do you have shell access in your web server? If yes, would you mind giving the output of the following command? find wp-content/plugins -type d -name php-di

It seems one of the ionos plugin embed a PHP-DI version incompatible with Matomo. It would like to check which one is it, to check if you can disable it.

Thanks in advance

Kind regards

Mat

itsalexandersimon commented 1 year ago

Hello @mattmary Thank you for your suggestions: I ran the command for you via SSH: find wp-content/plugins -type d -name php-di

The output was empty.

JFYI - I use a "Managed WordPress" installation at IONOS, which comes indeed with some plugins that are "mandatory." (I did not try to disable them).

Currently, I have uninstalled Matomo. Nevertheless, I will check whether logging information is available.

Otherwise, I will collect it during my next attempt; during that, I will also try your further hints.

With best wishes, Alexander

PS: Closing was not intended, so I reopened the case-

mattmary commented 1 year ago

Hello @itsalexandersimon

Thanks for your feedback.

Another user has also a IONOS hosting and we have identified potentially two problems:

Please let me know if it solves your issue. Kind regards

Mat

mattmary commented 1 year ago

Hello @itsalexandersimon

Have you been able to fix your problem? Kind regards

Mat

itsalexandersimon commented 1 year ago

Hi Mat, Not yet. I will investigate it in more detail after finalizing a critical release.

Kind regards, Alexander

mattmary commented 1 year ago

All good. Let us know.

Kind regards

Mat

empyfi commented 1 year ago

Also having the same issue with IONOS and Matomo, PHP 8.0/8.1/8.2 tested with the same error. Having tried the above linked custom configuration to php 8.1 CLI, now it is working. Is this "solution" stable enough to be persistant even after updates of matomo? Are ary any changes planned on Matomo side in order to automate the PHP recognition?

mattmary commented 1 year ago

Hello @empyfi

The config.ini.php file is not updated during Matomo upgrades: only the global.ini.php one. So no worries, you won't have anything to do when the plugin will be upgraded. Kind regards

Mat

itsalexandersimon commented 3 months ago

Dear Mat, Dear All, Today I returned to the Matomo WP Plugin and IONOS is still my hoster. Installing and activating the plugin today (about 1 year later) did not trigger the internal error message anymore.

However, my WP dashboard shows this warning message that can also be found in the Matomo Diagnostics section: There are some errors in the Matomo Diagnostics System report that may prevent the plugin for working normally.

How can I resolve any issues triggering it? Please find a copy of the system report below.

PS: IONOS notified me that they will soon upgrade me to WP 6.5.4., as I am using a managed WP hosting. Just in case.

With best wishes, Alexander

              # Matomo

Endpoints

Crons

Mandatory checks

Optional checks

Matomo Settings

Logs

WordPress

WordPress Plugins

MU Plugins

Plugins

Server

PHP cli

Database

Browser

All good. Let us know.

Kind regards

Mat

itsalexandersimon commented 3 months ago

PS: It seems that the issues are covered in this KB article that summarizes the discussions: https://matomo.org/faq/how-to-solve-the-error-message-your-php-cli-version-is-not-compatible-with-the-matomo-requirements/

I am contacting IONOS to learn about the exact path and will keep you posted about the results.

diosmosis commented 3 months ago

Hi @itsalexandersimon, you should be able to ignore that message. Matomo should work regardless (unless you are noticing empty reports or something similar?). (The warning currently appears in situations where it doesn't need to. We'll be fixing that in the future.)

itsalexandersimon commented 3 months ago

Thank you for the information, @diosmosis - Nevertheless, after manually setting the path to the correct CLI binaries, this part in the system report looks good:

PHP CLI Version | 8.2.20 |   MySQLi support | ok

JFYI - The IONOS support was helpful and confirmed that "/usr/bin/php" points to an old PHP version and they plan to change this in the future. The setting for PHP 8.2 is

php_binary_path="/usr/bin/php8.2-cli"