示例#1
0
    disp_system_check('ok');
} elseif ($post_max_size == $upload_max_filesize) {
    disp_system_check('warning', T_('post_max_size should be larger than upload_max_filesize'));
} else {
    disp_system_check('error', T_('post_max_size should be larger than upload_max_filesize'));
}
// Memory limit:
$memory_limit = system_check_memory_limit();
if (empty($memory_limit)) {
    init_system_check('PHP memory_limit', T_('n.a.'));
    disp_system_check('note');
} else {
    init_system_check('PHP memory_limit', ini_get('memory_limit'));
    if ($memory_limit < get_php_bytes_size('256M')) {
        disp_system_check('error', T_('The memory_limit is too low. Some features like image manipulation will fail to work.'));
    } elseif ($memory_limit < get_php_bytes_size('384M')) {
        disp_system_check('warning', T_('The memory_limit is low. Some features like image manipulation of large files may fail to work.'));
    } else {
        disp_system_check('ok');
    }
}
// Maximum execution time of each script
$max_execution_time = system_check_max_execution_time();
if (empty($max_execution_time)) {
    init_system_check('PHP max_execution_time', T_('Unlimited'));
    disp_system_check('ok');
} else {
    // Time is limited, can we request more?:
    $can_force_time = ini_set('max_execution_time', 600);
    // Try to force max_execution_time to 10 minutes
    if ($can_force_time !== false) {
示例#2
0
/**
 * @return integer
 */
function system_check_memory_limit()
{
    return get_php_bytes_size(ini_get('memory_limit'));
}
示例#3
0
//load_funcs('items/model/_item.funcs.php');
//load_funcs('users/model/_user.funcs.php');
//load_funcs( '_core/ui/forms/_form.funcs.php' );
load_class('_core/model/_timer.class.php', 'Timer');
//load_class( 'plugins/model/_plugins.class.php', 'Plugins' );
load_funcs('_core/_url.funcs.php');
load_funcs('tools/model/_system.funcs.php');
require_once dirname(__FILE__) . '/_functions_install.php';
$Timer = new Timer('main');
// Let the modules load/register what they need:
modules_call_method('init');
// Init charset variables based on the $evo_charset value
$current_charset = $evo_charset;
init_charsets($current_charset);
// Check minimum memory limit for successful using:
if (system_check_memory_limit() < get_php_bytes_size('48M')) {
    // Deny to use on server with small memory limit size:
    $install_memory_limit_allow = false;
    if ($action != 'localeinfo') {
        // Restrict all actions except of action to switch a language and view page of more languages:
        $action = 'start';
    }
} else {
    // Allow to use installer when memory limit is enough:
    $install_memory_limit_allow = true;
}
// Display mode:
// - 'normal' - Normal mode; Used for normal installation.
// - 'compact' - Compact mode; Hide header, footer and progress bar; Used for automated installation.
param('display', 'string', 'normal');
// check if we should try to connect to db if config is not done