Multiple errors on install - curly braces and vti files

It’s been working fine for years, but once I updated to PHP version 7.4 (MySQL 5.7) as demanded by my hosting service, Matomo became an error page. So I deleted Matomo directory then downloaded and installed the latest Matomo version via FileZilla in binary mode but now I get this error page when first visiting the installation directory…

Deprecated : Array and string offset access syntax with curly braces is deprecated in matomo/libs/upgradephp/upgrade.php on line 180

Deprecated : Array and string offset access syntax with curly braces is deprecated in matomo/libs/upgradephp/upgrade.php on line 194

Deprecated : Array and string offset access syntax with curly braces is deprecated in matomo/libs/upgradephp/upgrade.php on line 194

Deprecated : Array and string offset access syntax with curly braces is deprecated in matomo/libs/upgradephp/upgrade.php on line 200

Deprecated : Array and string offset access syntax with curly braces is deprecated in matomo/libs/upgradephp/upgrade.php on line 202

Matomo

An error occurred

Cannot connect to the database:

SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known

This may be a temporary issue, try [refreshing the page](javascript:window.location.reload()). If the problem persists please contact your Matomo administrator.

[Go Back](javascript:window.history.back():wink: | Go to Matomo

« Back to Matomo

Hi,

The curly braces error was fixed in https://github.com/matomo-org/matomo/commit/54dadb98beae46f88203df273d1bada6a2596b5b, so please update to a recent version of Matomo.

This message is not by Matomo, but the MySQL client builtin to PHP. Are you sure that your PHP-Server is able to reach the DB host you entered in your config/config.ini.php?

I downloaded the Motomo.zip from matomo.org. Are you telling me that Matomo.org doesn’t distribute their most recent version? Bizarre. So, okay, I’ll get the version from github then.
As for the database not connecting, I can’t get to the setup page as when I first visit the directory I get this error immediately.
Thanks for the information, I’ll go to github now and update the installation.

No, the version from matomo.org (so builds.matomo.org/latest.zip) is the correct one and includes this fix. The one from Github won’t work out of the box as it is only intended for development).

Okay, then. So why is the one I downloaded using the curly brackets if I downloaded it from matomo?
matomo-latest.zip was downloaded from https://matomo.org/docs/installation/ via the link

Download the latest release Matomo 4.6.2 from here:

I manually corrected the curly brackets and now all I get is the last half of the same message as I posted originally, as below. I cannot get to the configuration section as I only get this error page when I visit my site directory /matomo

Matomo

An error occurred

Cannot connect to the database:

SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known

This may be a temporary issue, try [refreshing the page](javascript:window.location.reload()). If the problem persists please contact your Matomo administrator.

[Go Back](javascript:window.history.back():wink: | Go to Matomo

« Back to Matomo

Can you please share which files exactly you modified?

And this error means that the domain PHP tries to connect to for the MySQL server doesn’t resolve to any IP address.

/matomo/libs/upgradephp/upgrade.php
lines 180, 190 (two instances), 200, 202

I suppose it would have a problem connecting to a DB when I haven’t been able to get to the point where I input the DB addy. Yes? I can’t even get to the welcome page let alone the stage where I can configure anything.

I just downloaded https://builds.matomo.org/latest.zip, unzipped it and the line 180 of piwik/libs/upgradephp/upgrade.php looks like this:

if ($line[0] == '[') {

If you want Matomo to show the installer again, you have to delete the config/config.ini.php (and maybe make a backup of it before).

I can’t explain it. When I look at the .zip I see square brackets too. When I look in the install directory on my site I see curly quotes. Perhaps a shadow of the deleted file from when I deleted the directory via the hosting cpanel?
Either way, I deleted the cofig file and now I have the welcome screen, so HUGE thanks for that.
Now I have all green checkmarks but a LONG list of files to be deleted that is toolong to post here by character limit. . LOL Should I delete these?

Files were found in your Matomo but we didn’t expect them.
→ Please delete these files to prevent errors. ←
It really does look like EVERY Matomo file!

If you would like to see the list of files it wants me to delete, here it is for the next few mintues…

http://s707396063.onlinehome.us/

Set up, but now I get this error.

Matomo

An error occurred

Session must be started before any output has been sent to the browser; output started in /matomo/plugins/CoreHome/Columns/Metrics/_vti_cnf/ActionsPerVisit.php/1

[Go Back](javascript:window.history.back():wink: | Go to Matomo

« Back to Matomo

Okay, once I installed the tracker, I get this 380,000 character hot mess on my motomo/index.php
Matomo used to be so easy to install. Thanks to my host mandating the upgrade to PHP things aren’t as easy this time.
I sincerely thank you for your help! At least I’m making progress now!

vti_encoding:SR|utf8-nl vti_timelastmodified:TR|19 May 2018 07:03:20 -0000 vti_author:SR|BLOO2\Smokr vti_modifiedby:SR|BLOO2\Smokr vti_nexttolasttimemodified:TR|19 May 2018 07:03:20 -0000 vti_timecreated:TR|07 Aug 2020 08:13:04 -0000 vti_extenderversion:SR|12.0.0.0 vti_syncwith_localhost\d:\my webs\raysstories/d:/my webs/raysstories:TR|19 May 2018 07:03:20 -0000 vti_cacheddtm:TX|07 Aug 2020 08:13:04 -0000 vti_filesize:IR|1034 vti_cachedneedsrewrite:BR|false vti_cachedhasbots:BR|false vti_cachedhastheme:BR|false vti_cachedhasborder:BR|false vti_charset:SR|utf-8 vti_backlinkinfo:VX| vti_encoding:SR|utf8-nl vti_timelastmodified:TR|19 May 2018 07:03:20 -0000 vti_author:SR|BLOO2\Smokr vti_modifiedby:SR|BLOO2\Smokr vti_nexttolasttimemodified:TR|19 May 2018 07:03:20 -0000 vti_timecreated:TR|07 Aug 2020 08:13:04 -0000 vti_extenderversion:SR|12.0.0.0 vti_syncwith_localhost\d:\my webs\raysstories/d:/my webs/raysstories:TR|19 May 2018 07:03:20 -0000 vti_cacheddtm:TX|07 Aug 2020 08:13:04 -0000 vti_filesize:IR|1034 vti_cachedneedsrewrite:BR|false vti_cachedhasbots:BR|false vti_cachedhastheme:BR|false vti_cachedhasborder:BR|false vti_charset:SR|utf-8 vti_backlinkinfo:VX| vti_encoding:SR|utf8-nl vti_timelastmodified:TR|19 May 2018 07:03:20 -0000 vti_author:SR|BLOO2\Smokr vti_modifiedby:SR|BLOO2\Smokr vti_nexttolasttimemodified:TR|19 May 2018 07:03:20 -0000 vti_timecreated:TR|07 Aug 2020 08:13:04 -0000 vti_extenderversion:SR|12.0.0.0 vti_syncwith_localhost\d:\my webs\raysstories/d:/my webs/raysstories:TR|19 May 2018 07:03:20 -0000 vti_cacheddtm:TX|07 Aug 2020 08:13:04 -0000 vti_filesize:IR|1267 vti_cachedneedsrewrite:BR|false vti_cachedhasbots:BR|false vti_cachedhastheme:BR|false vti_cachedhasborder:BR|false vti_charset:SR|utf-8 vti_backlinkinfo:VX| vti_encoding:SR|utf8-nl vti_timelastmodified:TR|19 May 2018 07:03:20 -0000 vti_author:SR|BLOO2\Smokr vti_modifiedby:SR|BLOO2\Smokr vti_nexttolasttimemodified:TR|19 May 2018 07:03:20 -0000

I still don’t have a working install. All I get is this huge page of script text and nothing else. It’s pages and pages long of nothing but this text, nothing else.

EDIT: I am going to delete the entire directory, then install into a new directory with a different name.

vti_encoding:SR|utf8-nl vti_timelastmodified:TR|19 May 2018 07:03:20 -0000 vti_author:SR|BLOO2\Smokr vti_modifiedby:SR|BLOO2\Smokr vti_nexttolasttimemodified:TR|19 May 2018 07:03:20 -0000 vti_timecreated:TR|07 Aug 2020 08:13:04 -0000 vti_extenderversion:SR|12.0.0.0 vti_syncwith_localhost\d:\my webs\raysstories/d:/my webs/raysstories:TR|19 May 2018 07:03:20 -0000 vti_cacheddtm:TX|07 Aug 2020 08:13:04 -0000 vti_filesize:IR|1034 vti_cachedneedsrewrite:BR|false vti_cachedhasbots:BR|false vti_cachedhastheme:BR|false vti_cachedhasborder:BR|false vti_charset:SR|utf-8 vti_backlinkinfo:VX| vti_encoding:SR|utf8-nl vti_timelastmodified:TR|19 May 2018 07:03:20 -0000 vti_author:SR|BLOO2\Smokr vti_modifiedby:SR|BLOO2\Smokr vti_nexttolasttimemodified:TR|19 May 2018 07:03:20 -0000 vti_timecreated:TR|07 Aug 2020 08:13:04 -0000 vti_extenderversion:SR|12.0.0.0 vti_syncwith_localhost\d:\my webs\raysstories/d:/my webs/raysstories:TR|19 May 2018 07:03:20 -0000 vti_cacheddtm:TX|07 Aug 2020 08:13:04 -0000 vti_filesize:IR|1034 vti_cachedneedsrewrite:BR|false vti_cachedhasbots:BR|false vti_cachedhastheme:BR|false vti_cachedhasborder:BR|false vti_charset:SR|utf-8 vti_backlinkinfo:VX| vti_encoding:SR|utf8-nl vti_timelastmodified:TR|19 May 2018 07:03:20 -0000 vti_author:SR|BLOO2\Smokr vti_modifiedby:SR|BLOO2\Smokr vti_nexttolasttimemodified:TR|19 May 2018 07:03:20 -0000 vti_timecreated:TR|07 Aug 2020 08:13:04 -0000 vti_extenderversion:SR|12.0.0.0 vti_syncwith_localhost\d:\my webs\raysstories/d:/my webs/raysstories:TR|19 May 2018 07:03:20 -0000 vti_cacheddtm:TX|07 Aug 2020 08:13:04 -0000 vti_filesize:IR|1267 vti_cachedneedsrewrite:BR|false vti_cachedhasbots:BR|false vti_cachedhastheme:BR|false vti_cachedhasborder:BR|false vti_charset:SR|utf-8 vti_backlinkinfo:VX| vti_encoding:SR|utf8-nl vti_timelastmodified:TR|19 May 2018 07:03:20 -0000 vti_author:SR|BLOO2\Smokr vti_modifiedby:SR|BLOO2\Smokr

Hi,

That doesn’t look like any file related to Matomo but some other files from a Windows webserver.
https://docs.microsoft.com/de-de/previous-versions/office/developer/sharepoint-2010/ms438802(v=office.14) might point that this is sharepoint-related

It might be something related to Microsoft ExpressionWeb which I use to edit/upload pages. That directory is my ExpressionWeb site on my computer. So maybe something happened where ExpressionWeb thought it should upload or update those Matomo files? I removed the Matomo files from that local directory and deleted the cache files related to it. I have now set ExpressionWeb to ignore the directory where I am uploading the new Matomo files using FileZilla.
Your help has been invaluable, thank you!

Fresh new install, and again it tells me to delete what looks like every Matomo file. WTF?
https://raysstories.com/piwikmatomo/index.php?action=systemCheck
File integrity File integrity check failed and reported some errors. You should fix this issue and then refresh this page until it shows no error.

Files were found in your Matomo but we didn’t expect them.
→ Please delete these files to prevent errors. ←

File to delete: config/environment/_vti_cnf/dev.php
File to delete: config/environment/_vti_cnf/test.php
File to delete: config/environment/_vti_cnf/ui-test.php
File to delete: config/_vti_cnf/config.ini.php
File to delete: config/_vti_cnf/global.ini.php
File to delete: config/_vti_cnf/global.php
File to delete: config/_vti_cnf/manifest.inc.php
then core/
libs/
plugins/
vendor/
vti/
and one libs/
File to delete: libs/bower_components/materialize/_vti_cnf/.npmignore

It’s hundreds of lines, the same I believe as I posted before.

Okay, something funky is going on here. When I go to the next page, my superuser name and password is already filled in! This is a new directory I’ve never used before, how can that be there?

Hi,

Can you check your webserver setup if everything is allright. The _vti_cnf and vti/ directory seems unrelated to Matomo and once again related to Microsoft webservers (https://stackoverflow.com/a/1163875/4398037) which I am not familiar at all with.

1 Like