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

SSL connections to MySQLi not supported [patch] #2752

Closed
anonymous-matomo-user opened this issue Nov 2, 2011 · 3 comments
Closed

SSL connections to MySQLi not supported [patch] #2752

anonymous-matomo-user opened this issue Nov 2, 2011 · 3 comments
Assignees
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.

Comments

@anonymous-matomo-user
Copy link

No matter what mysql host configuration I try using the installer, it always tries to connect to a localhost database even though I don't have one.

To bypass the installer, I installed piwik a separate computer with a localhost database, then exported/imported the database, and copied the configuration file. When I changed the config.inc.php host variable on the non-localhost db server to a remote mysql server, it still tried to connect to localhost.

I traced the code down to core/Tracker/Db/Pdo/Mysql.php and it looks to me like the host variable was never added as part of the dsn.

@anonymous-matomo-user
Copy link
Author

I withdraw my suspect diagnosis for dsn in core/Tracker/Db/Pdo/Mysql.php. Still trying to figure out where to hard-code something that will make it work. Will comment back here if I figure out out before I give up.

@anonymous-matomo-user
Copy link
Author

Nevermind. Close this if you want to. I forgot all the trouble this particular server has because it connects to remote mysql by SSL. That meant I had to patch libs/Zend/Db/Adapter/Mysqli.php to have a new connection string parameter:

        $_isConnected = @mysqli_real_connect(
            $this->_connection,
            $this->_config['host'],
            $this->_config['username'],
            $this->_config['password'],
            $this->_config['dbname'],
            $port,
            NULL,
            MYSQLI_CLIENT_FOUND_ROWS | MYSQLI_CLIENT_SSL
        );

If you keep the bug, the new title should be something like, "SSL connections to MySQL not supported."

@mattab
Copy link
Member

mattab commented Dec 14, 2012

please report the bug to Zend Framework so we could have a simple solution downstream in Piwik code? thx

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

3 participants