echo "********************************\n\n"; echo sprintf("php.ini used by PHP: %s\n\n", get_ini_path()); if (is_cli()) { echo "** WARNING **\n"; echo "* The PHP CLI can use a different php.ini file\n"; echo "* than the one used with your web server.\n"; if ('\\' == DIRECTORY_SEPARATOR) { echo "* (especially on the Windows platform)\n"; } echo "* If this is the case, please launch this\n"; echo "* utility from your web server.\n"; echo "** WARNING **\n"; } // mandatory echo "\n** Mandatory requirements **\n\n"; check(version_compare(phpversion(), '5.2.4', '>='), 'requires PHP >= 5.2.4', 'Current version is ' . phpversion(), true); check(!ini_get('zend.ze1_compatibility_mode'), 'php.ini: requires zend.ze1_compatibility_mode set to off', sprintf('Set it to off in php.ini (%s)', get_ini_path()), true); // warnings echo "\n** Optional checks **\n\n"; check(function_exists('token_get_all'), 'can use token_get_all()', 'Install token_get_all() function (highly recommended)', false); check(function_exists('mb_strlen'), 'can use mb_strlen()', 'Install mb_strlen() function', false); check(function_exists('iconv'), 'can use iconv()', 'Install iconv() function', false); check(function_exists('utf8_decode'), 'can use utf8_decode()', 'Install utf8_decode() function', false); $accelerator = function_exists('apc_store') && ini_get('apc.enabled') || function_exists('eaccelerator_put') && ini_get('eaccelerator.enable') || function_exists('xcache_set'); check($accelerator, 'has a PHP accelerator', 'Install a PHP accelerator (highly recommended)', false); check(!ini_get('magic_quotes_gpc'), 'php.ini: magic_quotes_gpc set to off', 'Set it to off in php.ini'); check(!ini_get('register_globals'), 'php.ini: register_globals set to off', 'Set it to off in php.ini'); check(!ini_get('session.auto_start'), 'php.ini: session.auto_start set to off', 'Set it to off in php.ini'); if (!is_cli()) { echo '</pre></body></html>'; }
<html> <head> <style> body { padding: 30px; text-align: center; width: 900px; font-family: Arial; } </style> </head> <body> <h1><img alt="symfony" style="vertical-align: middle" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAA2CAMAAAC1HibFAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRFpJiKd2RP0svE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fbRfAVEKc3OHZB1ki2k0bcbD2sb0tcAynHQdS9BFJssByApH0arGX9YSDMFy9CwSmQcZxg5wLuBIe6nwylsddhPyASCAxc/2gCh/GW9KHg8o60hAYM/dvBs3rSu2N8cctUrJSR938zrBPAfhBo29ro7uY3wdQlEL9rg77K4R0YvrQbvzhB+FUQYdscGpziEF/l0Hble0snyGCb6uRLC6Q+eNL7eXrA3z+8MucZqvqt+8AAwd8/hDOSqPrrXv8RDvIPDuGQ5os9B08/rBUC5A8dc/qdg2c/cxTw4Yczl4rgT4ABAEs+U8HAd4FjAAAAAElFTkSuQmCC" /> REQUIREMENTS CHECK</h1> EOF; echo sprintf("<p><small>php.ini used by PHP: %s</small></p>", get_ini_path()); } // mandatory echo_title("Mandatory requirements"); check(version_compare(phpversion(), '5.3.2', '>='), sprintf('Checking that PHP version is at least 5.3.2 (%s installed)', phpversion()), 'Install PHP 5.3.1 or newer (current version is ' . phpversion(), true); check(ini_get('date.timezone'), 'Checking that the "date.timezone" setting is set', 'Set the "date.timezone" setting in php.ini (like Europe/Paris)', true); 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); // 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); check(function_exists('mb_strlen'), 'Checking that the mb_strlen() function is available', 'Install and enable the mbstring extension', false); check(function_exists('iconv'), 'Checking that the iconv() function is available', 'Install and enable the iconv extension', false); check(function_exists('utf8_decode'), 'Checking that the utf8_decode() is available', 'Install and enable the XML extension', false);
function get_ini_path() { if ($path = get_cfg_var('cfg_file_path')) { return $path; } return 'WARNING: not using a php.ini file'; } if (!is_cli()) { echo '<html><body><pre>'; } echo "********************************\n"; echo "* *\n"; echo "* symfony requirements check *\n"; echo "* *\n"; echo "********************************\n\n"; echo sprintf("php.ini used by PHP: %s\n\n", get_ini_path()); if (is_cli()) { echo "** WARNING **\n"; echo "* The PHP CLI can use a different php.ini file\n"; echo "* than the one used with your web server.\n"; if ('\\' == DIRECTORY_SEPARATOR) { echo "* (especially on the Windows platform)\n"; } echo "* If this is the case, please launch this\n"; echo "* utility from your web server.\n"; echo "** WARNING **\n"; } // mandatory echo "\n** Mandatory requirements **\n\n"; check(version_compare(phpversion(), '5.2.4', '>='), sprintf('PHP version is at least 5.2.4 (%s)', phpversion()), 'Current version is ' . phpversion(), true); // warnings