Piwik 2.0 installation error [SQLSTATE[HY000] [2002]


#1

Hi!

I’m trying to install the new Piwik release (2.0) to my server (a fresh installation, without any other software), but I’m facing a weird error. If follow all the installation steps, once I reach the last step it shows me this error:

Your Piwik configuration file appears to be misconfigured. You can either remove config/config.ini.php and resume installation, or correct the database connection settings.

SQLSTATE[HY000] [2002] No such file or directory
Refresh the page »

If I delete config.ini.php (as it recommends), then the install process starts again with the same error in the last step.

It doesn’t change if I choose MySQLI or PDO in the database configuration step: it creates the database and the tables, but I get the error again and again.

If I check the php errors, it shows me

[18-Dec-2013 15:43:24 UTC] PHP Notice: Uninitialized string offset: 0 in …/htdocs/core/Tracker/Db/Pdo/Mysql.php on line 47

A little note about this error: it always appears, althought I choose PDO or MYSQLI

Here you have the config.ini.php once the error is shown:

cristian@teststacks-linux64:~/lampstack-5.4.23-0/apps/piwik/config$ cat config.ini.php
; <?php exit; ?> DO NOT REMOVE THIS LINE
; file automatically generated or modified by Piwik; you can manually override the default values in global.ini.php by redefining them in this file.
[PluginsInstalled]
PluginsInstalled[] = "Login"
PluginsInstalled[] = "CoreAdminHome"
PluginsInstalled[] = "UsersManager"
PluginsInstalled[] = "SitesManager"
PluginsInstalled[] = "Installation"
PluginsInstalled[] = "CoreUpdater"
PluginsInstalled[] = "ScheduledReports"
PluginsInstalled[] = "UserCountryMap"
PluginsInstalled[] = "Live"
PluginsInstalled[] = "CustomVariables"
PluginsInstalled[] = "PrivacyManager"
PluginsInstalled[] = "ImageGraph"
PluginsInstalled[] = "DoNotTrack"
PluginsInstalled[] = "Annotations"
PluginsInstalled[] = "Overlay"
PluginsInstalled[] = "SegmentEditor"
PluginsInstalled[] = “Zeitgeist”

[Plugins_Tracker]
Plugins_Tracker[] = "Provider"
Plugins_Tracker[] = "Goals"
Plugins_Tracker[] = "DoNotTrack"
Plugins_Tracker[] = "UserCountry"
Plugins_Tracker[] = "UsersManager"
Plugins_Tracker[] = “SitesManager”

Some info about my environment:
Apache

[quote=“Apache”]
Server version: Apache/2.4.7 (Unix)
Server built: Dec 12 2013 16:18:04
Server’s Module Magic Number: 20120211:27
Server loaded: APR 1.5.0, APR-UTIL 1.5.3
Compiled using: APR 1.5.0, APR-UTIL 1.5.3
Architecture: 64-bit[/quote]

[quote=“MySQL”]
Server version: 5.5.34 MySQL Community Server (GPL)[/quote]

[quote=“PHP”]
PHP 5.4.23 (cli) (built: Dec 12 2013 16:58:52)
Copyright © 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright © 1998-2013 Zend Technologies[/quote]

[quote=“OS”]
Linux teststacks-linux64 3.5.0-44-generic #67~precise1-Ubuntu SMP Wed Nov 13 16:16:57 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux[/quote]

Any ideas?

Best regards and thank you!


(Matthieu Aubry) #2

Delete the file config/config.ini.php and try again installing? the file seems incorrect


#3

I’ve tried it several times and it always shows me the same error after I click on “Go to Piwik”.

If I delete the config.ini.php, the installation process starts again

I also ensured that the database was deleted everytime I tryed a new installation.


(Matthieu Aubry) #4

Ok sorry didn’t read your message well the first time. Umh that’s quite strange… I fixed the Notice here: Fix notice if port empty PHP Notice: Uninitialized string offset: 0 i… · matomo-org/matomo@c2c2df6 · GitHub

What info exactly do you input in the DB Step?

Maybe some of the input you write during install create this bug.
could you list everything you type during install ? ie. maybe password or some other fields have some strange characters value that we havent tested with yet?


#5

Sorry for the delay @matt.

We have been testing the installation with the last version (2.0.1) and we have been experiencing issues too.

Now, it shows me this error:

I’m from the Bitnami Project (http://bitnami.com), and we are updating Piwik Stack to Piwik 2.X version. You can test it if you download lampstack LAMP Cloud Hosting, LAMP Installer, Docker Container and VM (I provide you the exact commands at the end of my post, to prepare the setup environment faster).

Here you have the data we are writing into the forms:

I give you the commands to prepare the environment faster (on a linux-x64):

wget http://downloads.bitnami.com/files/stacks/lampstack/5.4.23-0/bitnami-lampstack-5.4.23-0-linux-x64-installer.run
sudo install bitnami-lampstack-5.4.23-0-linux-x64-installer.run
cd /opt/lampstack-5.4.23-0/
mkdir apps/piwik
vim apache2/conf/bitnami/bitnami.conf (Modify the lines where it appears HTDOCS, and point it to /opt/lampstack-5.4.23-0/apps/piwik/)
cd /opt/lampstack-5.4.23-0/apps/piwik/ && wget http://builds.piwik.org/latest.zip
unzip latest.zip
mv piwik/* .
/opt/lampstack-5.4.23-0/ctlscript.sh restart apache

Go to your IP machine, and follow the web installation wizard.

Best regards, and thank you.


(Matthieu Aubry) #6

thanks for the details, unfortunately I still have no issue what could cause this… Umh…


(James) #7

I can confirm I’m getting this error as well.


[Sat Dec 21 17:27:09 2013] [error] [client ***.***.***.***] PHP Fatal error:  Call to a member function rewriteAssetsPathToTheme() on a non-object in /srv/vhosts/blach/docroot/core/AssetManager/UIAssetMerger.php on line 181, referer: https://examle.com/index.php?module=CoreUpdater&action=oneClickResults

Although it doesn’t seem to be breaking Piwik for me in any way


(Matthieu Aubry) #8

thanks for the report this was fixed in PHP Fatal error: Call to a member function rewriteAssetsPathToTheme() · Issue #4453 · matomo-org/matomo · GitHub


#9

when installing piwik i get:
Error while trying to connect to the database server:
SQLSTATE[HY000] [2002] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

what can i say?:S
on the db side all is ok - any help???
God bless
gabriel


#10

check this link see if it gives you any ideas


#11

it looks interesting, but where do i get my config.ini file in order to edit it?
God bless
gabriel


#12

there was 2 references in the article (a bit vague if they are actual locations though) other wise do a file search.