Errors - Piwik_ViewDataTable_GenerateGraphHTML & passed by reference


(jt-socal) #1

I recently updated to PHP 5.3 (irreversible) and converted tables to INNODB (reversible), now I am getting megabytes of errors like the following. Suggestions are appreciated. I tried switching the tables back to MyISAM, but that was no help.

  1 "2010-01-22T04:49:31-08:00" "2048" "Declaration of Piwik_ViewDataTable_GenerateGraphHTML::init() should be compatible with that of Piwik_ViewDataTable::init(       1 " "/var/www/piwik/piwik/core/ViewDataTable/GenerateGraphHTML.php" "21" "#0  Piwik_ErrorHandler(2048, Declaration of Piwik_ViewDataTable_GenerateGraphHTML::in       1 t() should be compatible with that of Piwik_ViewDataTable::init(), /var/www/piwik/piwik/core/ViewDataTable/GenerateGraphHTML.php, 21, Array ([class] => Piwik       1 ViewDataTable_GenerateGraphHTML,[classPath] => ViewDataTable/GenerateGraphHTML,[i] => 0,[path] => /var/www/piwik/piwik/core/ViewDataTable/GenerateGraphHTML.p       1 p)) called at [/var/www/piwik/piwik/core/ViewDataTable/GenerateGraphHTML.php:21]\n#1  require_once(/var/www/piwik/piwik/core/ViewDataTable/GenerateGraphHTML.       1 hp) called at [/var/www/piwik/piwik/core/Loader.php:63]\n#2  Piwik_Loader::autoload(Piwik_ViewDataTable_GenerateGraphHTML)\n#3  

and this

“2010-01-22T04:55:59-08:00” “2048” “Only variables should be passed by reference” “/var/www/piwik/piwik/plugins/MultiSites/Controller.php” “77” "#0 Piwik_ErrorHandler(2048, Only variables should be passed by reference, /var/www/piwik/piwik/plugins/MultiSites/Controller.php, 77, Array ([view] => Piwik_View Object ([] => MultiSites/templates/index.tpl,[] =>


(vipsoft) #2

I fixed the “incompatible declaration” messages in http://dev.piwik.org/trac/changeset/1796 but the “Only variables should be passed by reference” is going to require additional effort. (Are you running Piwik 0.5.4?)

In the meantime, create a bootstrap.php file in your piwik folder.

<?php
error_reporting(E_ALL & ~E_STRICT);

(jt-socal) #3

(Are you running Piwik 0.5.4?)

I was, but am now running SVN to get up to the minute updates in case you want me to test something. BTW, I am running CentOS 5.4 with php-5.3.1-1.el5.remi.

In the meantime, create a bootstrap.php file in your piwik folder.

Done, still getting errors, eg;

“2010-01-22T08:39:47-08:00” “2048” “Non-static method Piwik_VisitsSummary_API::getVisits() should not be called statically, assuming $this from incompatible context”$

“2010-01-22T08:39:47-08:00” “2048” "Non-static method Piwik_VisitsSummary_API::getActions() should not be called statically, assuming $this from incompatible context$

“2010-01-22T08:39:47-08:00” “2048” "Non-static method Piwik_VisitsSummary_API::getUniqueVisitors() should not be called statically, assuming $this from incompatible $

“2010-01-22T08:39:47-08:00” “2048” “Only variables should be passed by reference” “/var/www/piwik/piwik/plugins/MultiSites/Controller.php” “112” "#0 Piwik_ErrorHand$


(vipsoft) #4

Hmm… it shouldn’t be reporting E_STRICT (2048) warnings any more. What if you use ini_set(‘error_reporting’, E_ALL & ~E_STRICT);


(jt-socal) #5

Hmm, did not work. I also tried changing the error_reporting in index.php, piwik.php, and in php.ini. None seems to stop these warning.


(jt-socal) #6

Okay,
If I change

error_reporting(E_ALL|E_NOTICE);

in index.php to

error_reporting(0);

the 2048 errors stop.
Whew, that took some trial and error to figure out.