From 1a81c3de2712a21c014593c7b23b703b7328159b Mon Sep 17 00:00:00 2001 From: Stig Lindqvist Date: Wed, 28 Mar 2012 17:56:57 +1300 Subject: [PATCH] BUGFIX The SilverStripe installer throwing warning on settings that was legit. --- dev/install/install.php5 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dev/install/install.php5 b/dev/install/install.php5 index 5efee6e34..45c95f2d3 100644 --- a/dev/install/install.php5 +++ b/dev/install/install.php5 @@ -402,9 +402,9 @@ class InstallRequirements { $this->requireDateTimezone(array('PHP Configuration', 'date.timezone set and valid', 'date.timezone option in php.ini must be set in PHP 5.3.0+', ini_get('date.timezone'))); } - $this->suggestPHPSetting('asp_tags', array(''), array('PHP Configuration', 'asp_tags option turned off', 'This should be turned off as it can cause issues with SilverStripe')); - $this->suggestPHPSetting('magic_quotes_gpc', array(''), array('PHP Configuration', 'magic_quotes_gpc option turned off', 'This should be turned off, as it can cause issues with cookies. More specifically, unserializing data stored in cookies.')); - $this->suggestPHPSetting('display_errors', array(''), array('PHP Configuration', 'display_errors option turned off', 'Unless you\'re in a development environment, this should be turned off, as it can expose sensitive data to website users.')); + $this->suggestPHPSetting('asp_tags', array(false,0,''), array('PHP Configuration', 'asp_tags option turned off', 'This should be turned off as it can cause issues with SilverStripe')); + $this->suggestPHPSetting('magic_quotes_gpc', array(false,0,''), array('PHP Configuration', 'magic_quotes_gpc option turned off', 'This should be turned off, as it can cause issues with cookies. More specifically, unserializing data stored in cookies.')); + $this->suggestPHPSetting('display_errors', array(false,0,''), array('PHP Configuration', 'display_errors option turned off', 'Unless you\'re in a development environment, this should be turned off, as it can expose sensitive data to website users.')); // Check memory allocation $this->requireMemory(32*1024*1024, 64*1024*1024, array("PHP Configuration", "Memory allocated (PHP config option 'memory_limit')", "SilverStripe needs a minimum of 32M allocated to PHP, but recommends 64M.", ini_get("memory_limit"))); @@ -414,7 +414,6 @@ class InstallRequirements { function suggestPHPSetting($settingName, $settingValues, $testDetails) { $this->testing($testDetails); - $val = ini_get($settingName); if(!in_array($val, $settingValues) && $val != $settingValues) { $testDetails[2] = "$settingName is set to '$val' in php.ini. $testDetails[2]";