diff --git a/Symfony/app/check.php b/Symfony/app/check.php index 0a9cf8f..86ec27b 100644 --- a/Symfony/app/check.php +++ b/Symfony/app/check.php @@ -28,12 +28,13 @@ check(ini_get('date.timezone'), 'Checking that the "date.timezone" setting is se check(is_writable(__DIR__.'/../app/cache'), sprintf('Checking that app/cache/ directory is writable'), 'Change the permissions of the app/cache/ directory so that the web server can write in it', true); check(is_writable(__DIR__.'/../app/logs'), sprintf('Checking that the app/logs/ directory is writable'), 'Change the permissions of the app/logs/ directory so that the web server can write in it', true); check(function_exists('json_encode'), 'Checking that the json_encode() is available', 'Install and enable the json extension', true); check(class_exists('SQLite3') || in_array('sqlite', PDO::getAvailableDrivers()), 'Checking that the SQLite3 or PDO_SQLite extension is available', 'Install and enable the SQLite3 or PDO_SQLite extension.', true); check(function_exists('session_start'), 'Checking that the session_start() is available', 'Install and enable the session extension', true); check(function_exists('ctype_alpha'), 'Checking that the ctype_alpha() is available', 'Install and enable the ctype extension', true); +check(!(function_exists('apc_store') && ini_get('apc.enabled')) || version_compare(phpversion('apc'), '3.0.17', '>='), 'Checking that the APC version is at least 3.0.17', 'Upgrade your APC extension (3.0.17+)', true); // warnings echo_title("Optional checks"); check(class_exists('DomDocument'), 'Checking that the PHP-XML module is installed', 'Install and enable the php-xml module', false); check(defined('LIBXML_COMPACT'), 'Checking that the libxml version is at least 2.6.21', 'Upgrade your php-xml module with a newer libxml', false); check(function_exists('token_get_all'), 'Checking that the token_get_all() function is available', 'Install and enable the Tokenizer extension (highly recommended)', false); @@ -68,13 +69,12 @@ $accelerator = || function_exists('eaccelerator_put') && ini_get('eaccelerator.enable') || function_exists('xcache_set') ; check($accelerator, 'Checking that a PHP accelerator is installed', 'Install a PHP accelerator like APC (highly recommended)', false); -check(function_exists('apc_store') && ini_get('apc.enabled') && version_compare(phpversion('apc'), '3.0.17', '>='), 'Checking that the APC version is at least 3.0.17', 'Upgrade your APC extension (3.0.17+)', true); check(!ini_get('short_open_tag'), 'Checking that php.ini has short_open_tag set to off', 'Set short_open_tag to off in php.ini', false); check(!ini_get('magic_quotes_gpc'), 'Checking that php.ini has magic_quotes_gpc set to off', 'Set magic_quotes_gpc to off in php.ini', false); check(!ini_get('register_globals'), 'Checking that php.ini has register_globals set to off', 'Set register_globals to off in php.ini', false); check(!ini_get('session.auto_start'), 'Checking that php.ini has session.auto_start set to off', 'Set session.auto_start to off in php.ini', false); diff --git a/Symfony/web/config.php b/Symfony/web/config.php index b13ddca..74b7353 100644 --- a/Symfony/web/config.php +++ b/Symfony/web/config.php @@ -46,13 +46,13 @@ if (!defined('LIBXML_COMPACT')) { } if (!((function_exists('apc_store') && ini_get('apc.enabled')) || function_exists('eaccelerator_put') && ini_get('eaccelerator.enable') || function_exists('xcache_set'))) { $minorProblems[] = 'Install and enable a PHP accelerator like APC (highly recommended).'; } -if (!(function_exists('apc_store') && ini_get('apc.enabled') && version_compare(phpversion('apc'), '3.0.17', '>='))) { +if (!(!(function_exists('apc_store') && ini_get('apc.enabled')) || version_compare(phpversion('apc'), '3.0.17', '>='))) { $majorProblems[] = 'Upgrade your APC extension (3.0.17+)'; } if (!function_exists('token_get_all')) { $minorProblems[] = 'Install and enable the Tokenizer extension.'; }