"Fatal error" on installation


#1

Hi, I upload the latest version to mysite.com/analytics (unziped), and when access to the url to install Matomo I got this error instead the " Welcome Screen":

Fatal error : Class ‘DI\Definition\Source\Autowiring’ not found in /[redacted]/public_html/analytics/vendor/php-di/php-di/src/DI/ContainerBuilder.php on line 118
Matomo encountered an error: Class ‘DI\Definition\Source\Autowiring’ not found (which lead to: The root container has not been created yet.)
Fatal error : Uncaught exception ‘Piwik\Container\ContainerDoesNotExistException’ with message ‘The root container has not been created yet.’ in /[redacted]/public_html/analytics/core/Container/StaticContainer.php:40 Stack trace: #0 /[redacted]/public_html/analytics/core/Container/StaticContainer.php(80): Piwik\Container\StaticContainer::getContainer() #1 /[redacted]/public_html/analytics/core/Log.php(94): Piwik\Container\StaticContainer::get(‘Piwik\Log’) #2 /[redacted]/public_html/analytics/core/Log.php(225): Piwik\Log::getInstance() #3 /[redacted]/public_html/analytics/core/Log.php(172): Piwik\Log::logMessage(100, Object(Piwik\Container\ContainerDoesNotExistException), Array) #4 /[redacted]/public_html/analytics/core/FrontController.php(214): Piwik\Log::debug(Object(Piwik\Container\ContainerDoesNotExistException)) #5 [internal function]: Piwik\FrontController->__destruct() #6 {main} thrown in /[redacted]/public_html/analytics/core/Container/StaticContainer.php on line 40

I have a Hostgator shared hosting with PHP 5.5.

Hope you can help me to get this installed.

I’m not an expert on this topics, I’m following this guide Installing Matomo - Analytics Platform - Matomo

Thanks.


(Lukas Winkler) #2

Hi,

Just saw I have the same concerns with Google Analytics and tried to install Matomo [1] f... | Hacker News and noticed that I missed your post.

The error is really weird and I have no idea why it occurs. Maybe there is something really odd about the Hostgator setup.

Can you try to switch to a newer PHP version (7.0-7.2), which should also give you a nice performance boost compared to 5.5 (which btw doesn’t get any security fixes anymore) and try again.

If the error still occurs, we can take a closer look.


#3

Thanks! I find how to upgrade to 7.2 [1]. Will try it again and let you know!

[1] PHP Configuration Plugin « HostGator.com Support Portal


#4

It works! Thanks. I can see the installation screen now :slight_smile:

I’m on the database setup screen now (step 3).

I guess I have to create a new database in cpanel. I did it:

Now in the setup screen:

  1. What user/pass I have to put? I can’t find any user/pass on the database configuration.
  2. The default “Database Server” is ok?
  3. Any other comment about it.

Thanks for your help!


(Fabian Dellwing) #5
  1. You need to create a “privileged user” for the new database (see your other 3 dbs) and use this user to connect
  2. If this is a local SQL server your config is fine, if not you need to enter it’s IP (hostname).

#6

Thanks!

I create the user and add it with all the privileges to the DB with no problems!, but I got this error:

On “Database Server” I tried the default value that comes prefilled “127.0.0.1” and also “localhost”, “192.185.225.228”, “gator3308.hostgator.com” and didn’t work. Got this last info from my cpanel, I really don’t know if is totally unrelated, but I just try it
https://i.imgur.com/XFFmj22.png
(remember is a shared hosting)

What can be wrong?

Many thanks for your help Fabian.


(Lukas Winkler) #7

Hi,

The error message is the MySQL server telling you that the username or password is incorrect.

Honestly this is a part where your hoster can help far better as they know their server envirnoment.


#8

OK! Will try to find a solution. Thanks!