Changeset View
Changeset View
Standalone View
Standalone View
core/install/prerequisites.php
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Line(s) | |||||
/** | /** | ||||
* Returns information about system requirements | * Returns information about system requirements | ||||
* | * | ||||
* @return array | * @return array | ||||
*/ | */ | ||||
function CheckSystemRequirements() | function CheckSystemRequirements() | ||||
{ | { | ||||
$ret = Array (); | $ret = Array (); | ||||
$ret['php_version'] = version_compare(PHP_VERSION, '5.2.0', '>='); | $ret['php_version'] = version_compare(PHP_VERSION, '5.3.2', '>='); | ||||
if ( function_exists('apache_get_modules') ) { | if ( function_exists('apache_get_modules') ) { | ||||
$mod_rewrite = in_array('mod_rewrite', apache_get_modules()); | $mod_rewrite = in_array('mod_rewrite', apache_get_modules()); | ||||
} | } | ||||
else { | else { | ||||
$mod_rewrite = getenv('HTTP_MOD_REWRITE') == 'On'; | $mod_rewrite = getenv('HTTP_MOD_REWRITE') == 'On'; | ||||
} | } | ||||
Show All 14 Lines | |||||
$ret['jpeg'] = function_exists('imagecreatefromjpeg'); | $ret['jpeg'] = function_exists('imagecreatefromjpeg'); | ||||
$ret['mysql'] = function_exists('mysql_connect'); | $ret['mysql'] = function_exists('mysql_connect'); | ||||
$ret['json'] = function_exists('json_encode'); | $ret['json'] = function_exists('json_encode'); | ||||
$output = shell_exec('java -version 2>&1'); | $output = shell_exec('java -version 2>&1'); | ||||
$ret['java'] = stripos($output, 'java version') !== false; | $ret['java'] = stripos($output, 'java version') !== false; | ||||
$ret['composer'] = file_exists(FULL_PATH . '/vendor/autoload.php'); | |||||
$ret['memory_limit'] = $this->isPhpSettingChangeable('memory_limit', '33M'); | $ret['memory_limit'] = $this->isPhpSettingChangeable('memory_limit', '33M'); | ||||
$ret['display_errors'] = $this->isPhpSettingChangeable('display_errors', '1'); | $ret['display_errors'] = $this->isPhpSettingChangeable('display_errors', '1'); | ||||
$ret['error_reporting'] = $this->canChangeErrorReporting(); | $ret['error_reporting'] = $this->canChangeErrorReporting(); | ||||
$ret['date.timezone'] = ini_get('date.timezone') != ''; | $ret['date.timezone'] = ini_get('date.timezone') != ''; | ||||
$ret['variables_order'] = $this->_hasLetters(ini_get('variables_order'), Array ('G', 'P', 'C', 'S')); | $ret['variables_order'] = $this->_hasLetters(ini_get('variables_order'), Array ('G', 'P', 'C', 'S')); | ||||
$output_buffering = strtolower(ini_get('output_buffering')); | $output_buffering = strtolower(ini_get('output_buffering')); | ||||
$ret['output_buffering'] = $output_buffering == 'on' || $output_buffering > 0; | $ret['output_buffering'] = $output_buffering == 'on' || $output_buffering > 0; | ||||
▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Line(s) | |||||
$sql = 'SHOW VARIABLES LIKE "max_allowed_packet"'; | $sql = 'SHOW VARIABLES LIKE "max_allowed_packet"'; | ||||
$db_variables = $conn->Query($sql, 'Variable_name'); | $db_variables = $conn->Query($sql, 'Variable_name'); | ||||
$ret['packet_size'] = $db_variables['max_allowed_packet']['Value'] >= 1048576; | $ret['packet_size'] = $db_variables['max_allowed_packet']['Value'] >= 1048576; | ||||
return $ret; | return $ret; | ||||
} | } | ||||
} | } | ||||
No newline at end of file |