Unable to activate plugin in PHP 8.2.x environment
-
Hi, thanks for the great plugin.
However, after installing the “Matomo” plugin in a PHP 8.2.x environment, when I try to activate it, it fails with the following fatal error.[Tue Jan 17 11:15:58.790215 2023] [php:warn] [pid 26260:tid 1876] [client ::1:50940] PHP Warning: require_once(classes\WpMatomo\Admin\CookieConsent.php): Failed to open stream: No such file or directory in C:\xampp\htdocs\wordpress\wp-content\plugins\matomo\classes\WpMatomo\Settings.php on line 90, referer: https://localhost/wordpress/wp-admin/plugins.php?plugin=matomo%2Fmatomo.php
[Tue Jan 17 11:15:58.790215 2023] [php:error] [pid 26260:tid 1876] [client ::1:50940] PHP Fatal error: Uncaught Error: Failed opening required 'classes\WpMatomo\Admin\ \CookieConsent.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\wordpress\wp-content\plugins\matomo\classes\ WpMatomo\Settings.php:90\nStack trace:\n#0 C:\xampp\htdocs\wordpress\wp-content\plugins\matomo\classes\WpMatomo.php(50): matomo_plugin_autoloader('Admin\\CookieCon…')\n#1 C:\xampp\htdocs\wordpress\wp-content\plugins\matomo\matomo.php(212): WpMatomo ->__construct()\n#2 C:\xampp\htdocs\wordpress\wp-admin\includes\plugin.php(2314): include_once('C:\\xampp\\ \htdocs…')\n#3 C:\xampp\htdocs\wordpress\wp-admin\plugins.php(192): plugin_sandbox_scrape('matomo/matomo.p…')\ n#4 {main}\n thrown in C:\xampp\htdocs\wordpress\wp-content\plugins\matomo\classes\WpMatomo\Settings.php on line 90, referer: http ://localhost/wordpress/wp-admin/plugins.php?plugin=matomo% 2Fmatomo.phpIn PHP 8.1.x it can be enabled without any problem.
I have investigated this issue in the two environments below and the problem occurred in the same way in both environments.
Sorry for not being able to check in Linux environment.Environment 1
– Windows 11 22H2 (Build 22621.1105)
– XAMPP 8.2.0
– Apache 2.4.54
– MariaDB 10.4.27
– PHP 8.2.0 / PHP 8.1.12 (included in XAMPP 8.1.12)
– WordPress 6.1.1
– Matomo 4.13.0Environment 2
– Windows Server 2019 (Build 17763.3770)
– scoop 0.3.1
– Apache 2.4.54
– MySQL 8.0.31
– PHP 8.2.1 / PHP 8.1.14
– WordPress 6.1.1
– Matomo 4.13.0I tried to get the system report, but I was unable to because the installation was successful and the activation failed.
The non-plugin version of Matomo 4.13.1 fixes the PHP 8.2 deprecation warning, but I’m not sure if that has anything to do with it.
https://github.com/matomo-org/matomo/issues/20176Please check how to resolve the error. Thank you.
- The topic ‘Unable to activate plugin in PHP 8.2.x environment’ is closed to new replies.