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

Piwik installation fails in Database setup step (reference ticket #1076) #1079

Closed
anonymous-matomo-user opened this issue Dec 15, 2009 · 5 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@anonymous-matomo-user
Copy link

Still getting the same error. But this time database creation was successful. The screen showed certain warnings for the following:

  1. Database client character set ->
    Client connection to the database server is not set to UTF8 by default. This is not critical issue: Piwik should work correctly. However for consistency, it is recommended that you do one of the following:
    • in your piwik config/config.ini.php, add charset = utf8 under the [database] section of your Piwik configuration file config/config.ini.php
    • recompile libmysql --with-charset=utf8
  2. Database timezone
    PHP date.timezone is not the same as the database server timezone. This might cause issues with reports not showing data for the right hours of the day. More information at FAQ.

After proceeding from here, it is giving the same error as i had mentioned in my initial request ->
mysqli_stmt::bind_param() [mysqli-stmt.bind-param]: Number of variables doesn't match number of parameters in prepared statement
in 'C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\piwik\libs\Zend\Db\Statement\Mysqli.php' at the line 204
#0 Piwik_ErrorHandler(2, mysqli_stmt::bind_param() [Number of variables doesn't match number of parameters in prepared statement, C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\piwik\libs\Zend\Db\Statement\Mysqli.php, 204, Array (params => Array ([=> ssss,1 => version_core,[=> 0.5.2,3 => 1,[=> 0.5.2),stmtParams => Array ([=> ssss,1 => version_core,[=> 0.5.2,3 => 1,[=> 0.5.2),value => 0.5.2,[k] => 4))
#1 mysqli_stmt->bind_param(ssss, version_core, 0.5.2, 1, 0.5.2)
#2 call_user_func_array(Array ([=> mysqli_stmt Object (),1 => bind_param), Array ([=> ssss,1 => version_core,[=> 0.5.2,3 => 1,[=> 0.5.2)) called at C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\piwik\libs\Zend\Db\Statement\Mysqli.php:204
#3 Zend_Db_Statement_Mysqli->_execute(Array ([=> version_core,1 => 0.5.2,[=> 1,3 => 0.5.2)) called at Files\Apache Software Foundation\Apache2.2\htdocs\piwik\libs\Zend\Db\Statement.php:300
#4 Zend_Db_Statement->execute(Array ([=> version_core,1 => 0.5.2,[=> 1,3 => 0.5.2)) called at Files\Apache Software Foundation\Apache2.2\htdocs\piwik\libs\Zend\Db\Adapter\Abstract.php:468
#5 Zend_Db_Adapter_Abstract->query(INSERT INTO piwik_option (option_name, option_value, autoload) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE option_value = ?, Array ([=> version_core,1 => 0.5.2,[=> 1,3 => 0.5.2)) called at Files\Apache Software Foundation\Apache2.2\htdocs\piwik\core\PluginsFunctions\Sql.php:37
#6 Piwik_Query(INSERT INTO piwik_option (option_name, option_value, autoload) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE option_value = ?, Array ([=> version_core,1 => 0.5.2,[=> 1,3 => 0.5.2)) called at Files\Apache Software Foundation\Apache2.2\htdocs\piwik\core\Option.php:80
#7 Piwik_Option->set(version_core, 0.5.2, 1) called at Files\Apache Software Foundation\Apache2.2\htdocs\piwik\core\Option.php:109
#8 Piwik_SetOption(version_core, 0.5.2, 1) called at Files\Apache Software Foundation\Apache2.2\htdocs\piwik\core\Updater.php:64
#9 Piwik_Updater->recordComponentSuccessfullyUpdated(core, 0.5.2) called at Files\Apache Software Foundation\Apache2.2\htdocs\piwik\plugins\Installation\Controller.php:294
#10 Piwik_Installation_Controller->tablesCreation() called at Files\Apache Software Foundation\Apache2.2\htdocs\piwik\plugins\Installation\Installation.php:62
#11 Piwik_Installation->dispatch(Piwik_Event_Notification Object ([=> FrontController.NoConfigurationFile,_notificationObject => Exception Object ([=> The configuration file C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\piwik/config/config.ini.php has not been found., => ,[=> 0, => C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\piwik\core\Config.php,[=> 110, => Array ([=> Array (file => C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\piwik\core\Piwik.php,[=> 1580,function => init,[=> Piwik_Config,type => ->,[=> Array ()),1 => Array ([=> C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\piwik\core\FrontController.php,line => 202,[=> createConfigObject,class => Piwik,[=> ::,args => Array ()),[=> Array (file => C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\piwik\index.php,[=> 103,function => init,[=> Piwik_FrontController,type => ->,[=> Array ()))),_notificationInfo => Array (),[=> 0,_notificationCount => 0))
#12 call_user_func_array(Array ([=> Piwik_Installation Object ( => Piwik_Installation_Controller),[=> dispatch), Array (0 => Piwik_Event_Notification Object ([=> FrontController.NoConfigurationFile,_notificationObject => Exception Object ([=> The configuration file C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\piwik/config/config.ini.php has not been found., => ,[=> 0, => C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\piwik\core\Config.php,[=> 110, => Array ([=> Array (file => C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\piwik\core\Piwik.php,[=> 1580,function => init,[=> Piwik_Config,type => ->,[=> Array ()),1 => Array ([=> C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\piwik\core\FrontController.php,line => 202,[=> createConfigObject,class => Piwik,[=> ::,args => Array ()),[=> Array (file => C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\piwik\index.php,[=> 103,function => init,[=> Piwik_FrontController,type => ->,[=> Array ()))),_notificationInfo => Array (),[=> 0,_notificationCount => 0))) called at Files\Apache Software Foundation\Apache2.2\htdocs\piwik\libs\Event\Dispatcher.php:213
#13 Event_Dispatcher->addObserver(Array ([=> Piwik_Installation Object ( => Piwik_Installation_Controller),[=> dispatch), FrontController.NoConfigurationFile) called at C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\piwik\core\PluginsManager.php:362
#14 Piwik_PluginsManager->addPluginObservers(Piwik_Installation Object ([=> Piwik_Installation_Controller)) called at C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\piwik\core\PluginsManager.php:248
#15 Piwik_PluginsManager->loadPlugins() called at Files\Apache Software Foundation\Apache2.2\htdocs\piwik\core\PluginsManager.php:165
#16 Piwik_PluginsManager->setPluginsToLoad(Array ([=> CorePluginsAdmin,1 => CoreAdminHome,[=> CoreHome,3 => API,[=> Widgetize,5 => LanguagesManager,[=> Actions,7 => Dashboard,[=> MultiSites,9 => Referers,[=> UserSettings,11 => UserCountry,[=> VisitsSummary,13 => VisitFrequency,[=> VisitTime,15 => VisitorInterest,[=> ExampleAPI,17 => ExamplePlugin,[=> ExampleRssWidget,19 => ExampleFeedburner,[=> ExampleRssWidget,21 => Provider,[=> Feedback,23 => Login,[=> UsersManager,25 => SitesManager,[=> Installation)) called at C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\piwik\core\FrontController.php:209
#17 Piwik_FrontController->init() called at Files\Apache Software Foundation\Apache2.2\htdocs\piwik\index.php:103

Thanks,

Simi

Retail | INFOSYS TECHNOLOGIES LIMITED | Bangalore | India

@anonymous-matomo-user
Copy link
Author

Attachment:
piwikerror.JPG

@robocoder
Copy link
Contributor

The problem appears to be in your mysqli extension or mysql client library.

Reference: http://ca2.php.net/manual/en/mysqli-stmt.bind-param.php

From the backtrace, we see the SQL contains 4 question marks for 4 named parameters:

INSERT INTO `piwik_option` (option_name, option_value, autoload)  VALUES (?, ?, ?)  ON DUPLICATE KEY UPDATE option_value = ?

This is the data:

Array (
[params] => Array (
    [0] => ssss,
    [1] => version_core,
    [2] => 0.5.2,
    [3] => 1,
    [4] => 0.5.2),
[stmtParams] => Array (
    [0] => ssss,
    [1] => version_core,
    [2] => 0.5.2,
    [3] => 1,
    [4] => 0.5.2),
[value] => 0.5.2,
[k] => 4))

Both params and stmtParams have 5 elements where the first ('ssss') represents 4 string ('s') parameters, followed by the 4 values. This is correct/expected, so the bind_param() failure isn't a Piwik problem.

I suggest you take a look at XAMPP (at apachefriends.org).

@anonymous-matomo-user
Copy link
Author

Can you please tell me for which version of MySQL, the latest version of Piwik (0.5.2) works? MySQL version used here is mysql-5.1.39-win32.

In the installation steps (http://piwik.org/docs/requirements/) it says -> MySQL version 4.1 or greater can be used

But in readme file it says -> mysql 4.1

Please help!

@robocoder
Copy link
Contributor

Search your computer for libmysql.dll. I'm going to guess you have at least 3 copies -- one in your Apache folder, one in PHP, and another somewhere in MySQL.

Unless you're using php-cgi, Apache is loading PHP. In that case, Apache and PHP should both be using the same version of libmysql.dll.

Otherwise, please use XAMPP. It's a pre-built LAMP distribution.

@anonymous-matomo-user
Copy link
Author

Thanks a lot. You were indeed right. The versions of libmysql.dll were not the same in Apache and PHP. After correcting it, i was able to proceed with the piwik installation. Thanks once again.

@anonymous-matomo-user anonymous-matomo-user added this to the Piwik 0.5.2 milestone Jul 8, 2014
@mattab mattab added the wontfix label Aug 3, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. 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