Upgrade from 1.7 to 1.7.1


#1

Get the following error trying to get to the website…

Invalid argument supplied for foreach()
in ‘/home/palwalrus/piwik.walrus-workz.com/core/Config.php’ at the line 290

#0 Piwik_ErrorHandler(…) called at [/home/palwalrus/piwik.walrus-workz.com/core/Config.php:290]
#1 Piwik_Config->cacheConfigArray(…) called at [/home/palwalrus/piwik.walrus-workz.com/core/Config.php:334]
#2 Piwik_Config->__get(…) called at [/home/palwalrus/piwik.walrus-workz.com/core/Session.php:31]
#3 Piwik_Session::isFileBasedSessions(…) called at [/home/palwalrus/piwik.walrus-workz.com/core/FrontController.php:238]
#4 Piwik_FrontController->init(…) called at [/home/palwalrus/piwik.walrus-workz.com/index.php:52]

Any clues?
Paul Lawson


(Matthieu Aubry) #2

check that your files in config/config.ini.php and config/global.ini.php are valid?


#3

I checked the config/config.ini.php and it is the same I have had since original install, it was not replaced by this upgrade. I looked at the global.ini.php and that had changed but been backed up, so I renamed the new version and put the old one back and got the same error.

Invalid argument supplied for foreach()
in ‘/home/palwalrus/piwik.walrus-workz.com/core/Config.php’ at the line 290

#0 Piwik_ErrorHandler(…) called at [/home/palwalrus/piwik.walrus-workz.com/core/Config.php:290]
#1 Piwik_Config->cacheConfigArray(…) called at [/home/palwalrus/piwik.walrus-workz.com/core/Config.php:334]
#2 Piwik_Config->__get(…) called at [/home/palwalrus/piwik.walrus-workz.com/core/Session.php:31]
#3 Piwik_Session::isFileBasedSessions(…) called at [/home/palwalrus/piwik.walrus-workz.com/core/FrontController.php:238]
#4 Piwik_FrontController->init(…) called at [/home/palwalrus/piwik.walrus-workz.com/index.php:52]


(Matthieu Aubry) #4

If your config/global.ini.php the same as http://dev.piwik.org/svn/trunk/config/global.ini.php ?

If yes, apply the patch for more debug message:


Index: core/Config.php
===================================================================
--- core/Config.php	(revision 5891)
+++ core/Config.php	(working copy)
@@ -287,6 +287,7 @@
 	protected function cacheConfigArray()
 	{
 		$allSections = array();
+		var_dump($this->defaultConfig);
 		foreach($this->defaultConfig as $sectionName => $valueInDefaultConfig)
 		{
 			$allSections[] = $sectionName;

what does it output on the screen?


#5

Copied that across and that then indicated that the global.ini was corrupted, got that back from a backup I had taken and all is working now. Not sure how the files were corrupted but seem to be working now, although there seems to be no data in the database for the last four days.

Thanks,
PAL