Problems with piwik installation


(Seifreed) #1

I’m a newbie working with Piwik.
Piwik I uploaded to my server and when trying to install I got an error.
Searching the Internet I came to this forum and following the link could solve
the problem:
dev.piwik.org/trac/changeset/1989
Once I replaced the file I get the following error:

Invalid argument supplied for foreach() 
in '/var/www/vhosts/seifreed.net/subdomains/estadisticas/httpdocs/core/Config.php' at the line 264

#0  Piwik_ErrorHandler(2, Invalid argument supplied for foreach(), /var/www/vhosts/seifreed.net/subdomains/estadisticas/httpdocs/core/Config.php, 264, Array ([allSections] => Array ())) called at [/var/www/vhosts/seifreed.net/subdomains/estadisticas/httpdocs/core/Config.php:264]
#1  Piwik_Config->cacheConfigArray() called at [/var/www/vhosts/seifreed.net/subdomains/estadisticas/httpdocs/core/Config.php:308]
#2  Piwik_Config->__get(Plugins) called at [/var/www/vhosts/seifreed.net/subdomains/estadisticas/httpdocs/core/FrontController.php:209]
#3  Piwik_FrontController->init() called at [/var/www/vhosts/seifreed.net/subdomains/estadisticas/httpdocs/index.php:103]

Thank you very much for the help


(vipsoft) #2

Obviously that’s not the fix to the original problem you were having. Can you revert back to the 0.5.5 release or the 0.6-rc1 (release candidate)?


(Seifreed) #3

Hi

I installed the beta, now when I load the graphics I get this error

Notice: Object of class Piwik_Date to string conversion in /var/www/vhosts/seifreed.net/subdomains/estadisticas/httpdocs/libs/Zend/Db/Statement/Pdo.php on line 228

Thank you very much for the help


(vipsoft) #4

What version of PHP are you using?


(Seifreed) #5

My PHP version is

[root@seifreed ~]# rpm -qa php
php-5.1.6-24.el5_4.5

Thanks!!!


(vipsoft) #6

Yeah, looks like an incompatibility with pre-php 5.2.

What 's the error when using Piwik 0.5.5?


(Seifreed) #7

Hello

It seems that now has left me to install version 0.5. Now when some graphic gives me the following error:

/core/DataTable/Filter/Sort.php on line 120

Thanks in advance


(Matthieu Aubry) #8

Does the initial bug happen on 0.6-rc1 and is it a php bug or piwik bug?


(Matthieu Aubry) #9

To help resolve the issue with Notice: Object of class Piwik_Date to string conversion in /var/www/vhosts/seifreed.net/subdomains/estadisticas/httpdocs/libs/Zend/Db/Statement/Pdo.php on line 228

I would need the full backtrace of the error. Thanks


(estorado) #10

Hi,

have an similar problem, only the notice is different:

Notice: Object of class Piwik_Date to string conversion in /var/www/vhosts/blogschatz.de/httpdocs/piwik/libs/Zend/Db/Statement/Mysqli.php on line 208

If I switch the date from yesterday to today, the error occurs.
My PHP Version: 5.1.6

Here is the full backtrace:

Notice: Object of class Piwik_Date to string conversion in /var/www/vhosts/blogschatz.de/httpdocs/piwik/libs/Zend/Db/Statement/Mysqli.php on line 208 

Backtrace -->
#0 Piwik_ErrorHandler(8, Object of class Piwik_Date to string conversion, /var/www/vhosts/blogschatz.de/httpdocs/piwik/libs/Zend/Db/Statement/Mysqli.php, 208, Array ([params] => Array ([0] => ssssssss,[1] => 62,[2] => 1,[3] => Piwik_Date Object ([] => 1273017600,[] => UTC),[4] => Piwik_Date Object ([] => 1273017600,[] => UTC),[5] => 1,[6] => 2010-05-05 16:53:25,[7] => done,[8] => 2),[stmtParams] => Array ([0] => ssssssss,[1] => 62,[2] => 1,[3] => Piwik_Date Object ([] => 1273017600,[] => UTC),[4] => Piwik_Date Object ([] => 1273017600,[] => UTC),[5] => 1,[6] => 2010-05-05 16:53:25,[7] => done,[8] => 2),[value] => 2,[k] => 8)) called at [(null):0]
#1 mysqli_stmt->execute() called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/libs/Zend/Db/Statement/Mysqli.php:208]
#2 Zend_Db_Statement_Mysqli->_execute(Array ([0] => 62,[1] => 1,[2] => Piwik_Date Object ([] => 1273017600,[] => UTC),[3] => Piwik_Date Object ([] => 1273017600,[] => UTC),[4] => 1,[5] => 2010-05-05 16:53:25,[6] => done,[7] => 2)) called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/libs/Zend/Db/Statement.php:300]
#3 Zend_Db_Statement->execute(Array ([0] => 62,[1] => 1,[2] => Piwik_Date Object ([] => 1273017600,[] => UTC),[3] => Piwik_Date Object ([] => 1273017600,[] => UTC),[4] => 1,[5] => 2010-05-05 16:53:25,[6] => done,[7] => 2)) called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/libs/Zend/Db/Adapter/Abstract.php:468]
#4 Zend_Db_Adapter_Abstract->query(INSERT IGNORE INTO piwik_archive_numeric_2010_05 (idarchive, idsite, date1, date2, period, ts_archived, name, value)
VALUES (?,?,?,?,?,?,?,?), Array ([0] => 62,[1] => 1,[2] => Piwik_Date Object ([] => 1273017600,[] => UTC),[3] => Piwik_Date Object ([] => 1273017600,[] => UTC),[4] => 1,[5] => 2010-05-05 16:53:25,[6] => done,[7] => 2)) called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/core/PluginsFunctions/Sql.php:41]
#5 Piwik_Sql::query(INSERT IGNORE INTO piwik_archive_numeric_2010_05 (idarchive, idsite, date1, date2, period, ts_archived, name, value)
VALUES (?,?,?,?,?,?,?,?), Array ([0] => 62,[1] => 1,[2] => Piwik_Date Object ([] => 1273017600,[] => UTC),[3] => Piwik_Date Object ([] => 1273017600,[] => UTC),[4] => 1,[5] => 2010-05-05 16:53:25,[6] => done,[7] => 2)) called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/core/PluginsFunctions/Sql.php:86]
#6 Piwik_Query(INSERT IGNORE INTO piwik_archive_numeric_2010_05 (idarchive, idsite, date1, date2, period, ts_archived, name, value)
VALUES (?,?,?,?,?,?,?,?), Array ([0] => 62,[1] => 1,[2] => Piwik_Date Object ([] => 1273017600,[] => UTC),[3] => Piwik_Date Object ([] => 1273017600,[] => UTC),[4] => 1,[5] => 2010-05-05 16:53:25,[6] => done,[7] => 2)) called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/core/ArchiveProcessing.php:634]
#7 Piwik_ArchiveProcessing->insertRecord(Piwik_ArchiveProcessing_Record_Numeric Object ([name] => done,[value] => 2)) called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/core/ArchiveProcessing.php:567]
#8 Piwik_ArchiveProcessing->insertNumericRecord(done, 2) called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/core/ArchiveProcessing.php:428]
#9 Piwik_ArchiveProcessing->initCompute() called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/core/ArchiveProcessing.php:409]
#10 Piwik_ArchiveProcessing->launchArchiving() called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/core/Archive/Single.php:185]
#11 Piwik_Archive_Single->prepareArchive() called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/core/Archive.php:170]
#12 Piwik_Archive::build(1, day, 2010-05-05) called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/plugins/UserSettings/API.php:41]
#13 Piwik_UserSettings_API->getDataTable(UserSettings_browser, 1, day, 2010-05-05) called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/plugins/UserSettings/API.php:72]
#14 Piwik_UserSettings_API->getBrowser(1, day, 2010-05-05) called at [(null):0]
#15 call_user_func_array(Array ([0] => Piwik_UserSettings_API Object (),[1] => getBrowser), Array ([0] => 1,[1] => day,[2] => 2010-05-05)) called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/core/API/Proxy.php:147]
#16 Piwik_API_Proxy->call(Piwik_UserSettings_API, getBrowser, Array ([method] => UserSettings.getBrowser,[format] => original,[filter_limit] => 5,[filter_sort_column] => nb_uniq_visitors,[filter_sort_order] => desc,[module] => UserSettings,[action] => getBrowser,[idSite] => 1,[period] => day,[date] => 2010-05-05)) called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/core/API/Request.php:113]
#17 Piwik_API_Request->process() called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/core/ViewDataTable.php:341]
#18 Piwik_ViewDataTable->loadDataTableFromAPI() called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/core/ViewDataTable/HtmlTable.php:75]
#19 Piwik_ViewDataTable_HtmlTable->main() called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/core/Controller.php:153]
#20 Piwik_Controller->renderView(Piwik_ViewDataTable_HtmlTable Object ([] => ,[arrayDataTable] => ,[] => CoreHome/templates/datatable.tpl,[] => 1,[] => Array ([enable_sort] => 1,[filter_sort_column] => nb_uniq_visitors,[filter_sort_order] => desc,[filter_limit] => 5),[] => Array ([show_goals] => ,[show_search] => ,[show_table] => 1,[show_table_all_columns] => 1,[show_all_views_icons] => 1,[show_export_as_image_icon] => ,[show_exclude_low_population] => ,[show_offset_information] => 1,[show_footer] => 1,[show_footer_icons] => 1,[apiMethodToRequestDataTable] => UserSettings.getBrowser,[uniqueId] => UserSettingsgetBrowser),[] => 0,[] => ,[] => getBrowser,[] => UserSettings,[] => ,[] => UserSettings.getBrowser,[] => ,[] => Array ([label] => Browser,[nb_visits] => Besucher,[nb_actions] => Aktionen,[max_actions] => Maximale Aktionen bei einem Besuch,[sum_visit_length] => Von Besuchern verbrachte Gesamtzeit (in Sekunden),[nb_uniq_visitors] => Eindeutige Besucher,[nb_actions_per_visit] => Aktionen pro Besuch,[avg_time_on_site] => Durchschnittszeit auf der Seite,[bounce_rate] => Absprungsrate,[revenue_per_visit] => Wert pro Besuch,[goals_conversion_rate] => Besuche mit Konversionen),[] => Array ([0] => label,[1] => nb_uniq_visitors),[period] => day,[otherPeriods] => Array ([1] => week,[2] => month,[3] => year),[periodsNames] => Array ([day] => Array ([singular] => Tag,[plural] => Tage),[week] => Array ([singular] => Woche,[plural] => Wochen),[month] => Array ([singular] => Monat,[plural] => Monate),[year] => Array ([singular] => Jahr,[plural] => Jahre)),[isDataAvailable] => 1), ) called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/plugins/UserSettings/Controller.php:73]
#21 Piwik_UserSettings_Controller->getBrowser() called at [(null):0]
#22 call_user_func_array(Array ([0] => Piwik_UserSettings_Controller Object ([] => UserSettings,[] => 2010-05-05,[] => Piwik_Date Object ([] => 1273017600,[] => UTC),[] => 1,[] => Piwik_Site Object ([] => 1),[] => Array ([label] => General_ColumnLabel,[nb_visits] => General_ColumnNbVisits,[nb_actions] => General_ColumnNbActions,[max_actions] => General_ColumnMaxActions,[sum_visit_length] => General_ColumnSumVisitLength,[nb_uniq_visitors] => General_ColumnNbUniqVisitors,[nb_actions_per_visit] => General_ColumnActionsPerVisit,[avg_time_on_site] => General_ColumnAvgTimeOnSite,[bounce_rate] => General_ColumnBounceRate,[revenue_per_visit] => General_ColumnValuePerVisit,[goals_conversion_rate] => General_ColumnVisitsWithConversions)),[1] => getBrowser), Array ()) called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/core/FrontController.php:129]
#23 Piwik_FrontController->dispatch() called at [/var/www/vhosts/blogschatz.de/httpdocs/piwik/index.php:59]



(Yehudal) #11

Hello,

Seeing the same issue here, system is CentOS 5.4, and I’ve updated PHP using the utterramblings yum repo, PHP is at 0.5.2.11.

The issue first occurred after upgrading to the latest version of Piwik using the automatic installer. Errors look like:
Object of class Piwik_Date to string conversion in /var/www/vhosts/hostname.com/httpdocs/piwik/libs/Zend/Db/Statement/Pdo.php on line 228

Stack Trace for the ‘Actions’ tab:

*** Update: ***

Resolved after re-install of PHP and HTTP server reload.


(vipsoft) #12

Seifreed & estorado: please see http://dev.piwik.org/trac/attachment/ticket/1328/1328.patch


(estorado) #13

vipsoft: Thanks! It works!