From 835ecf5ddbc973b21837723c8a08039b69e162ed Mon Sep 17 00:00:00 2001 From: Xkeeper Date: Wed, 9 Nov 2011 23:09:12 -0800 Subject: [PATCH] Fixing firewall requirement --- lib/function.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/function.php b/lib/function.php index 84e2007..a603e4c 100644 --- a/lib/function.php +++ b/lib/function.php @@ -17,7 +17,9 @@ if (file_exists("lib/firewall.php")) { require("lib/firewall.php"); # Oh no! + $nofw = false; } else { + $nofw = true; function firewall() {} } @@ -31,6 +33,7 @@ $HTTP_COOKIE_VARS = addslashes_array($HTTP_COOKIE_VARS); } + if ($_GET['a']) print "sr = ". $_SERVER['DOCUMENT_ROOT'] ."
"; if(!ini_get('register_globals')){ $supers=array('_ENV', '_SERVER', '_GET', '_POST', '_COOKIE',); @@ -60,7 +63,24 @@ require 'lib/mysql.php'; - + firewall(); + if ($nofw) { + $sql = new mysql; + $sql -> connect($sqlhost, $sqluser, $sqlpass) or + die("Damn + + +
+ +

The MySQL server has exploded. +
+
Error: ". mysql_error() ." +
+
This is not a hack attempt; it is a server problem. + "); + + $sql -> selectdb($dbname) or die("Another stupid MySQL error happened, panic
". mysql_error() .""); + }