define('DC_ADMIN_SSL', false); } if (defined('DC_FORCE_SCHEME_443') && DC_FORCE_SCHEME_443) { http::$https_scheme_on_443 = true; } if (!defined('DC_DBPERSIST')) { define('DC_DBPERSIST', false); } if (!defined('DC_UPDATE_URL')) { define('DC_UPDATE_URL', 'http://download.dotclear.net/versions.xml'); } if (!defined('DC_UPDATE_VERSION')) { define('DC_UPDATE_VERSION', 'stable'); } try { $core = new dcCore(DC_DBDRIVER, DC_DBHOST, DC_DBNAME, DC_DBUSER, DC_DBPASSWORD, DC_DBPREFIX, DC_DBPERSIST); } catch (Exception $e) { __error($e->getMessage(), $e->getCode() == 0 ? '<p>This either means that the username and password information in ' . 'your <strong>config.php</strong> file is incorrect or we can\'t contact ' . 'the database server at "<em>' . DC_DBHOST . '</em>". This could mean your ' . 'host\'s database server is down.</p> ' . '<ul><li>Are you sure you have the correct username and password?</li>' . '<li>Are you sure that you have typed the correct hostname?</li>' . '<li>Are you sure that the database server is running?</li></ul>' . '<p>If you\'re unsure what these terms mean you should probably contact ' . 'your host. If you still need help you can always visit the ' . '<a href="http://forum.dotclear.net/">Dotclear Support Forums</a>.</p>' : '', 20); } # If we have some __top_behaviors, we load them if (isset($__top_behaviors) && is_array($__top_behaviors)) { foreach ($__top_behaviors as $b) { $core->addBehavior($b[0], $b[1]); } unset($b); } http::trimRequest(); try { http::unsetGlobals(); } catch (Exception $e) { header('Content-Type: text/plain');
} if (!defined('DC_DBPERSIST')) { define('DC_DBPERSIST', false); } if (!defined('DC_UPDATE_URL')) { define('DC_UPDATE_URL', 'http://download.dotclear.org/versions.xml'); } if (!defined('DC_UPDATE_VERSION')) { define('DC_UPDATE_VERSION', 'stable'); } if (!defined('DC_ALLOW_MULTI_MODULES')) { define('DC_ALLOW_MULTI_MODULES', false); } l10n::init(); try { $core = new dcCore(DC_DBDRIVER, DC_DBHOST, DC_DBNAME, DC_DBUSER, DC_DBPASSWORD, DC_DBPREFIX, DC_DBPERSIST); } catch (Exception $e) { init_prepend_l10n(); if (!defined('DC_CONTEXT_ADMIN')) { __error(__('Site temporarily unavailable'), __('<p>We apologize for this temporary unavailability.<br />' . 'Thank you for your understanding.</p>'), 20); } else { __error(__('Unable to connect to database'), $e->getCode() == 0 ? sprintf(__('<p>This either means that the username and password information in ' . 'your <strong>config.php</strong> file is incorrect or we can\'t contact ' . 'the database server at "<em>%s</em>". This could mean your ' . 'host\'s database server is down.</p> ' . '<ul><li>Are you sure you have the correct username and password?</li>' . '<li>Are you sure that you have typed the correct hostname?</li>' . '<li>Are you sure that the database server is running?</li></ul>' . '<p>If you\'re unsure what these terms mean you should probably contact ' . 'your host. If you still need help you can always visit the ' . '<a href="http://forum.dotclear.net/">Dotclear Support Forums</a>.</p>') . (DC_DEBUG ? __('The following error was encountered while trying to read the database:') . '</p><ul><li>' . $e->getMessage() . '</li></ul>' : ''), DC_DBHOST != '' ? DC_DBHOST : 'localhost') : '', 20); } } # If we have some __top_behaviors, we load them if (isset($__top_behaviors) && is_array($__top_behaviors)) { foreach ($__top_behaviors as $b) { $core->addBehavior($b[0], $b[1]); } unset($b); }