$starttime = array_sum(explode(' ', microtime())); // this script relies on the superglobal arrays, fake it here for old PHP versions if (phpversion() < '4.1.0') { $_SERVER = $HTTP_SERVER_VARS; $_GET = $HTTP_GET_VARS; } // instantiate a new phpThumb() object ob_start(); if (!(include_once dirname(__FILE__) . '/phpthumb.class.php')) { ob_end_flush(); die('failed to include_once("' . realpath(dirname(__FILE__) . '/phpthumb.class.php') . '")'); } ob_end_clean(); $phpThumb = new phpThumb(); $phpThumb->DebugTimingMessage('phpThumb.php start', __FILE__, __LINE__, $starttime); $phpThumb->SetParameter('config_error_die_on_error', true); if (!phpthumb_functions::FunctionIsDisabled('set_time_limit')) { set_time_limit(60); // shouldn't take nearly this long in most cases, but with many filters and/or a slow server... } // phpThumbDebug[0] used to be here, but may reveal too much // info when high_security_mode should be enabled (not set yet) if (file_exists(dirname(__FILE__) . '/phpThumb.config.php')) { ob_start(); if (include_once dirname(__FILE__) . '/phpThumb.config.php') { // great } else { ob_end_flush(); $phpThumb->ErrorImage('failed to include_once(' . dirname(__FILE__) . '/phpThumb.config.php) - realpath="' . realpath(dirname(__FILE__) . '/phpThumb.config.php') . '"'); } ob_end_clean();