register_globals is On (warning, you should have this param in the Off state, or your site will be unsafe)';
$aErrors[] = (ini_get('safe_mode') == 0) ? '' : 'safe_mode is On, disable it';
$aErrors[] = (version_compare(PHP_VERSION, '5.4.0', '<')) ? 'PHP version too old, please update to PHP 5.4.0 at least' : '';
$aErrors[] = (!extension_loaded( 'mbstring')) ? 'mbstring extension not installed. Warning! Dolphin cannot work without mbstring extension.' : '';
$aErrors[] = (ini_get('short_open_tag') == 0 && version_compare(phpversion(), "5.4", "<") == 1) ? 'short_open_tag is Off (must be On!)Warning! Dolphin cannot work without short_open_tag.' : '';
$aErrors[] = (ini_get('allow_url_include') == 0) ? '' : 'allow_url_include is On (warning, you should have this param in the Off state, or your site will be 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( $site['url'] );
$iPortDefault = 'https' == $aUrl['scheme'] ? '443' : '80';
if ( isset($_SERVER['HTTP_HOST']) and 0 != strcasecmp($_SERVER['HTTP_HOST'], $aUrl['host']) and 0 != strcasecmp($_SERVER['HTTP_HOST'], $aUrl['host'] . ':' . (!empty($aUrl['port']) ? $aUrl['port'] : $iPortDefault)) ) {
$sPort = empty($aUrl['port']) || 80 == $aUrl['port'] || 443 == $aUrl['port'] ? '' : ':' . $aUrl['port'];
header( "Location:{$aUrl['scheme']}://{$aUrl['host']}{$sPort}{$_SERVER['REQUEST_URI']}", true, 301 );
exit;
}
// check if install folder exists
if ( !defined ('BX_SKIP_INSTALL_CHECK') && file_exists( $dir['root'] . 'install' ) ) {
$ret = <<Dolphin Installed