ini_set('display_errors', 'On'); error_reporting(E_ALL | E_STRICT); } else { // Production - Don't display any errors to the end user ini_set('display_errors', 'Off'); // Report all fatal types of errors (this allows them to be logged to the web server) error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR); } /*** Include a bunch of function ***/ /*** TODO: See Issue #94 ***/ require_once PHPWS_SOURCE_DIR . 'Global/Functions.php'; /*** Exception Handler ***/ set_exception_handler(array('Error', 'exceptionHandler')); if (ERRORS_AS_EXCEPTION) { set_error_handler(array('Error', 'errorHandler')); } require_once PHPWS_SOURCE_DIR . 'Global/Implementations.php'; require_once PHPWS_SOURCE_DIR . 'config/core/source.php'; require_once PHPWS_SOURCE_DIR . 'inc/Security.php'; PHPWS_Core::checkOverpost(); PHPWS_Core::setLastPost(); Language::setLocale(Settings::get('Global', 'language')); if (!PHPWS_Core::checkBranch()) { throw new Exception('Unknown branch called'); } function PHPWS_unBootstrap() { restore_exception_handler(); restore_error_handler(); spl_autoload_unregister('phpwsAutoload'); }