matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.67k stars 2.62k forks source link

php dom and xml extension warning, but packages are installed? #12211

Open m4ntic0r opened 6 years ago

m4ntic0r commented 6 years ago

Today i upgraded my server from ubuntu server 17.04 to 17.10 and so far everything seems to be ok but i get system warnings in piwik system check.

There is a warning for the "dom" extension and "simplexml" extension.

On system -> apt-cache search php-dom, the package php7.1-xml is listed and this is installed On system -> apt-cache search simplexml, the same package php7.1-xml is found and installed

php-xml is installed, too

php version shown in the webui: 7.0.22-0ubuntu0.17.04.1

apt-get update and apt-get dist-upgrade shows, that everything is updated, no new packages are found.

i am using piwik 3.2.0

fdellwing commented 6 years ago

You are using PHP7.0 and not PHP7.1.

Please install php7.0-xml and php7.0-dom.

To check for installed PHP modules run dpkg -l | grep php

sgiehl commented 6 years ago

Could you create a simple php script to check what get_loaded_extensions() returns?

fdellwing commented 6 years ago

You mean php -m or in this case php7.0 -m? ^^

m4ntic0r commented 6 years ago

after the error i restored from backup and everything was ok.

now i just tried the upgrade to 17.10 again and now everything seems to run, after upgrade i had to manually install php7.1 and some 7.1 extensions.

system check says everything is ok, and PHP-Version: 7.1.8-1ubuntu1

sgiehl commented 6 years ago

You mean php -m or in this case php7.0 -m? ^^

No, the output of the php function get_loaded_extensions(), not sure if that's always the same as php -m

fdellwing commented 6 years ago

It is.

robocoder commented 6 years ago

php -m loads the cli configuration; technically, it could have different extensions loaded than mod_php or php-fpm.

BloodyIron commented 4 years ago

Yeah I have php7.2-xml and php7.2-gd installed, yet the checker says they aren't. I'm using the latest version as of today, unsure what on earth it's complaining about.

robocoder commented 4 years ago

On Ubuntu, there are separate conf.d/ .ini files for php-cli and mod-apache that load PHP extensions.

You can check this by opening your browser to a file in your web server document folder that contains:

<?php phpinfo();

Or

<?php var_dump(get_loaded_extensions());
BloodyIron commented 4 years ago

But I know that the modules are loaded as apache shows them enabled (in the modules-enabled folder). Same way all the other modules are loaded. I don't see why the behaviour would be different here.

tsteur commented 4 years ago

@BloodyIron could you test what @robocoder suggests in https://github.com/matomo-org/matomo/issues/12211#issuecomment-573321106 ? It's important to have it tested through the browser. Maybe you need to make some changes.