diff -ruBbd cacti-0.8.6h/scripts/query_host_cpu.php cacti-0.8.6h-patch/scripts/query_host_cpu.php
--- cacti-0.8.6h/scripts/query_host_cpu.php	2006-01-03 22:08:30.000000000 -0500
+++ cacti-0.8.6h-patch/scripts/query_host_cpu.php	2007-01-01 12:53:18.015625000 -0500
@@ -1,6 +1,15 @@
 <?php
 
+/* do NOT run this script through a web browser */
+if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD'])  || isset($_SERVER['REMOTE_ADDR'])) {
+   die("<br><strong>This script is only meant to run at the command line.</strong>");
+}
+
 $no_http_headers = true;
+
+/* display No errors */
+error_reporting(0);
+
 include(dirname(__FILE__) . "/../include/config.php");
 include(dirname(__FILE__) . "/../lib/snmp.php");
 
diff -ruBbd cacti-0.8.6h/scripts/query_host_partitions.php cacti-0.8.6h-patch/scripts/query_host_partitions.php
--- cacti-0.8.6h/scripts/query_host_partitions.php	2006-01-03 22:08:30.000000000 -0500
+++ cacti-0.8.6h-patch/scripts/query_host_partitions.php	2007-01-01 12:53:18.015625000 -0500
@@ -1,6 +1,15 @@
 <?php
 
+/* do NOT run this script through a web browser */
+if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD'])  || isset($_SERVER['REMOTE_ADDR'])) {
+   die("<br><strong>This script is only meant to run at the command line.</strong>");
+}
+
 $no_http_headers = true;
+
+/* display No errors */
+error_reporting(0);
+
 include(dirname(__FILE__) . "/../include/config.php");
 include(dirname(__FILE__) . "/../lib/snmp.php");
 
diff -ruBbd cacti-0.8.6h/scripts/sql.php cacti-0.8.6h-patch/scripts/sql.php
--- cacti-0.8.6h/scripts/sql.php	2006-01-03 22:08:30.000000000 -0500
+++ cacti-0.8.6h-patch/scripts/sql.php	2007-01-01 12:53:18.000000000 -0500
@@ -1,6 +1,15 @@
 <?
 
+/* do NOT run this script through a web browser */
+if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD'])  || isset($_SERVER['REMOTE_ADDR'])) {
+   die("<br><strong>This script is only meant to run at the command line.</strong>");
+}
+
 $no_http_headers = true;
+
+/* display No errors */
+error_reporting(0);
+
 include(dirname(__FILE__) . "/../include/config.php");
 
 if ($database_password == "") {
diff -ruBbd cacti-0.8.6h/scripts/ss_fping.php cacti-0.8.6h-patch/scripts/ss_fping.php
--- cacti-0.8.6h/scripts/ss_fping.php	2006-01-03 22:08:30.000000000 -0500
+++ cacti-0.8.6h-patch/scripts/ss_fping.php	2007-01-01 12:53:18.000000000 -0500
@@ -1,11 +1,15 @@
 <?php
 #!/usr/bin/php -q
 
-//STANDARD SCRIPT SERVER HEADER!!!
+/* do NOT run this script through a web browser */
+if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD'])  || isset($_SERVER['REMOTE_ADDR'])) {
+   die("<br><strong>This script is only meant to run at the command line.</strong>");
+}
+
 $no_http_headers = true;
 
 /* display No errors */
-error_reporting(E_ERROR);
+error_reporting(0);
 
 include_once(dirname(__FILE__) . "/../include/config.php");
 include_once(dirname(__FILE__) . "/../lib/snmp.php");
diff -ruBbd cacti-0.8.6h/scripts/ss_host_cpu.php cacti-0.8.6h-patch/scripts/ss_host_cpu.php
--- cacti-0.8.6h/scripts/ss_host_cpu.php	2006-01-03 22:08:30.000000000 -0500
+++ cacti-0.8.6h-patch/scripts/ss_host_cpu.php	2007-01-01 12:53:18.000000000 -0500
@@ -1,8 +1,14 @@
 <?php
+
+/* do NOT run this script through a web browser */
+if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD'])  || isset($_SERVER['REMOTE_ADDR'])) {
+   die("<br><strong>This script is only meant to run at the command line.</strong>");
+}
+
 $no_http_headers = true;
 
 /* display No errors */
-error_reporting(E_ERROR);
+error_reporting(0);
 
 include_once(dirname(__FILE__) . "/../lib/snmp.php");
 
diff -ruBbd cacti-0.8.6h/scripts/ss_host_disk.php cacti-0.8.6h-patch/scripts/ss_host_disk.php
--- cacti-0.8.6h/scripts/ss_host_disk.php	2006-01-03 22:08:30.000000000 -0500
+++ cacti-0.8.6h-patch/scripts/ss_host_disk.php	2007-01-01 12:53:18.000000000 -0500
@@ -1,8 +1,14 @@
 <?php
+
+/* do NOT run this script through a web browser */
+if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD'])  || isset($_SERVER['REMOTE_ADDR'])) {
+   die("<br><strong>This script is only meant to run at the command line.</strong>");
+}
+
 $no_http_headers = true;
 
 /* display No errors */
-error_reporting(E_ERROR);
+error_reporting(0);
 
 include_once(dirname(__FILE__) . "/../lib/snmp.php");
 
diff -ruBbd cacti-0.8.6h/scripts/ss_sql.php cacti-0.8.6h-patch/scripts/ss_sql.php
--- cacti-0.8.6h/scripts/ss_sql.php	2006-01-03 22:08:30.000000000 -0500
+++ cacti-0.8.6h-patch/scripts/ss_sql.php	2007-01-01 12:53:18.015625000 -0500
@@ -1,9 +1,14 @@
 <?php
 
+/* do NOT run this script through a web browser */
+if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD'])  || isset($_SERVER['REMOTE_ADDR'])) {
+   die("<br><strong>This script is only meant to run at the command line.</strong>");
+}
+
 $no_http_headers = true;
 
-/* display ALL errors */
-error_reporting(E_ALL);
+/* display No errors */
+error_reporting(0);
 
 if (!isset($called_by_script_server)) {
 	include_once(dirname(__FILE__) . "/../include/config.php");
