Esempio n. 1
0
		echo '<h1>Permission denied: BITRIX SESSID ERROR</h1>';
	exit;
}
elseif($_REQUEST['test_start'])
{
	if (defined('NOT_CHECK_PERMISSIONS') && NOT_CHECK_PERMISSIONS ===true || check_bitrix_sessid())
	{
		$oTest = new CSiteCheckerTest($_REQUEST['step'], (int) $_REQUEST['fast']);
		if ($_REQUEST['global_test_vars'] && ($d = base64_decode($_REQUEST['global_test_vars'])))
		{
			if (!CheckSerializedData($d))
				die('Error unserialize');
			$oTest->arTestVars = unserialize($d);
		}

		$oTest->Start();
		if ($oTest->percent < 100)
		{
			$strNextRequest = '&step='.$oTest->step.'&global_test_vars='.base64_encode(serialize($oTest->arTestVars));
			$strFinalStatus = '';
		}
		else
		{
			$strNextRequest = '';
			$strFinalStatus = '100%';
		}
		// test mode
		echo '
			iPercent = '.$oTest->percent.';
			test_percent = '.$oTest->test_percent.';
			strCurrentTestFunc = "'.$oTest->last_function.'";
Esempio n. 2
0
	function CommonTest()
	{
		if (!IsModuleInstalled('intranet') || defined('FX_CRONTAB')) // can't get real HTTP server vars from cron
			return "CSiteCheckerTest::CommonTest();";

		IncludeModuleLangFile($_SERVER['DOCUMENT_ROOT'].'/freetrix/modules/main/admin/site_checker.php');

		$step = 0;
		while(true)
		{
			if (is_object($oTest))
				$ar = $oTest->arTestVars;
			$oTest = new CSiteCheckerTest($step, $fast = 1);
			$oTest->arTestVars = $ar;
			$oTest->host = $_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : 'localhost';
			$oTest->ssl = $_SERVER['HTTPS'] == 'on';
			$oTest->port = $_SERVER['SERVER_PORT'] ? $_SERVER['SERVER_PORT'] : ($oTest->ssl ? 443 : 80);
			$oTest->Start();
			if ($oTest->result === false)
			{
				$ar = Array(
					"MESSAGE" => GetMessage("MAIN_SC_GOT_ERRORS", array('#LINK#' => "/freetrix/admin/site_checker.php?lang=".LANGUAGE_ID."&express_test=Y")),
					"TAG" => "SITE_CHECKER",
					"MODULE_ID" => "MAIN",
					'TYPE' => 'ERROR'
				);
				CAdminNotify::Add($ar);

				break;
			}

			if ($oTest->percent >= 100)
				break;
			$step++;
		}
		return "CSiteCheckerTest::CommonTest();";
	}
Esempio n. 3
0
	function CommonTest()
	{
		if (!IsModuleInstalled('intranet') || defined('BX_CRONTAB') || (defined('CHK_EVENT') && CHK_EVENT === true)) // can't get real HTTP server vars from cron
			return "CSiteCheckerTest::CommonTest();";
		if (($ntlm_varname = COption::GetOptionString('ldap', 'ntlm_varname', 'REMOTE_USER')) && ($user = trim($_SERVER[$ntlm_varname])))
			return "CSiteCheckerTest::CommonTest();"; // Server NTLM is enabled, no way to connect through a socket

		IncludeModuleLangFile($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/admin/site_checker.php');

		$step = 0;
		while(true)
		{
			if (is_object($oTest))
				$ar = $oTest->arTestVars;
			$oTest = new CSiteCheckerTest($step, $fast = 1);
			$oTest->arTestVars = $ar;
			$oTest->host = $_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : 'localhost';
			$oTest->ssl = $_SERVER['HTTPS'] == 'on';
			$oTest->port = $_SERVER['SERVER_PORT'] ? $_SERVER['SERVER_PORT'] : ($oTest->ssl ? 443 : 80);
			$oTest->Start();
			if ($oTest->result === false)
			{
				$ar = Array(
					"MESSAGE" => GetMessage("MAIN_SC_GOT_ERRORS", array('#LINK#' => "/bitrix/admin/site_checker.php?lang=".LANGUAGE_ID."&express_test=Y")),
					"TAG" => "SITE_CHECKER",
					"MODULE_ID" => "MAIN",
					'TYPE' => 'ERROR'
				);
				CAdminNotify::Add($ar);

				break;
			}

			if ($oTest->percent >= 100)
				break;
			$step++;
		}
		return "CSiteCheckerTest::CommonTest();";
	}
Esempio n. 4
0
}
elseif($_REQUEST['test_start'])
{
	if (defined('NOT_CHECK_PERMISSIONS') && NOT_CHECK_PERMISSIONS ===true || check_bitrix_sessid())
	{
		$oTest = new CSiteCheckerTest($_REQUEST['step'],(int) $_REQUEST['fix_mode']);
		if ($_REQUEST['global_test_vars'] && ($d = base64_decode($_REQUEST['global_test_vars'])))
		{
			if (!CheckSerializedData($d))
				die('Error unserialize');
			$oTest->arTestVars = unserialize($d);
		}
		else
			$oTest->arTestVars = array();

		$oTest->Start($_REQUEST['failed']);
		if ($oTest->percent < 100)
		{
			$strNextRequest = '&step='.$oTest->step.'&global_test_vars='.base64_encode(serialize($oTest->arTestVars));
			$strFinalStatus = '';
		}
		else
		{
			$strNextRequest = '';
			$strFinalStatus = '100%';
		}
		echo '
			iPercent = '.$oTest->percent.';
			test_percent = '.$oTest->test_percent.';
			strCurrentTestFunc = "'.$oTest->last_function.'";
			strCurrentTestName = "'.CUtil::JSEscape($oTest->strCurrentTestName).'";