Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.ini.php resulting in database error (docker, but should not matter) #12206

Closed
pir1981 opened this issue Oct 18, 2017 · 3 comments
Closed
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@pir1981
Copy link

pir1981 commented Oct 18, 2017

Hi,
I have
piwik:3.2.0-fpm (https://github.com/piwik/docker-piwik)
nginx:1.12.1
mysql:5.7.19

I don't seem to be able to get config.ini.php up and running for a clean Piwik install. I have dropped it in the /var/www/html/config with following contents

  • none at all
  • an exact copy of global.ini.php
  • just (which is the only thing I want)
[log]
log_writers[] = file

always resulting in a not working piwik instance, stating there has been an error. From my nginx error.log

2017/10/18 15:57:43 [error] 7#7: *41 FastCGI sent in stderr: "PHP message: Error in Piwik: Cannot connect to the database: SQLSTATE[HY000] [2002] No such file or directory This may be a temporary issue, try refreshing the page. If the problem persists please contact your Piwik administrator" while reading response header from upstream, client: 172.16.0.6, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://172.16.0.12:9000", host: "something.dev"

If I remove the config.ini.php again, everything is just fine and I get the Piwik welcome page.
What am I doing wrong? I have the log folder for the log file, I even have created the log file with www-data rights... but just can't figure it out. Thanks

@pir1981
Copy link
Author

pir1981 commented Oct 18, 2017

ok, I found it out. It was not clear to me, that I have to run through the whole browser setup process first, and that creates a config.ini.php itself. I tried having config.ini.php just without the host/db set and it seems that once you have that file, it is assumed that you went through the init process. If you don't have it, the init process is just started. I didn't find that in any FAQ, so might be worth adding it.

@pir1981 pir1981 closed this as completed Oct 18, 2017
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Oct 18, 2017
@mattab
Copy link
Member

mattab commented Oct 18, 2017

@pir1981 Which FAQ do you think we should add this information into? thanks

@ydarias
Copy link

ydarias commented Jan 14, 2019

So, do you know any solution to deploy Matomo using Docker with a DB that uses SSL? (e.g: a DB hosted by Compose)

The official instructions, as @pir1981 said, indicate that the setup must be done against the DB without SSL and later configure it in the config.ini.php file. But using Docker that doesn't sound too good from the maintainability point of view and some DB providers like Compose doesn't allow not SSL connections.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

3 participants