register_globals is On (warning, you should have this param in Off state, or your site will unsafe)';
$aErrors[] = (ini_get('safe_mode') == 0) ? '' : 'safe_mode is On, disable it';
$aErrors[] = (version_compare(PHP_VERSION, '5.2.0', '<')) ? 'PHP version too old, please update to PHP 5.2.0 at least' : '';
$aErrors[] = (!extension_loaded( 'mbstring')) ? 'mbstring extension not installed. Warning! Dolphin cannot work without mbstring extension.' : '';
if (version_compare(phpversion(), "5.2", ">") == 1) {
$aErrors[] = (ini_get('allow_url_include') == 0) ? '' : 'allow_url_include is On (warning, you should have this param in Off state, or your site will unsafe)';
};
$aErrors = array_diff($aErrors, array('')); // delete empty
if (count($aErrors)) {
$sErrors = implode("
", $aErrors);
echo <<
Please go to the
Dolphin Troubleshooter
and solve the problem.
EOF;
exit;
}
}
// check correct hostname
$aUrl = parse_url( BX_DOL_URL_ROOT );
if (isset($_SERVER['HTTP_HOST']) and 0 != strcasecmp($_SERVER['HTTP_HOST'], $aUrl['host']) and 0 != strcasecmp($_SERVER['HTTP_HOST'], $aUrl['host'] . ':80')) {
header( "Location:http://{$aUrl['host']}{$_SERVER['REQUEST_URI']}" );
exit;
}
// check if install folder exists
if (!defined ('BX_SKIP_INSTALL_CHECK') && file_exists(BX_DIRECTORY_PATH_ROOT . 'install')) {
header('Location:' . BX_DOL_URL_ROOT . 'install/index.php?action=remove_install');
exit;
}
// set PHP options
error_reporting(E_ALL);
ini_set('magic_quotes_sybase', 0);
mb_internal_encoding('UTF-8');
mb_regex_encoding('UTF-8');
// include files necessary for basic functionality
require_once(BX_DIRECTORY_PATH_CLASSES . "BxDol.php");
require_once(BX_DIRECTORY_PATH_INC . "utils.inc.php");
bx_import('BxDolConfig');
bx_import('BxDolService');
bx_import('BxDolAlerts');
bx_import('BxDolDb');
require_once(BX_DIRECTORY_PATH_INC . "profiles.inc.php");
$o = new BxDolAlerts('system', 'begin', 0);
$o->alert();