debug connection handle

Signed-off-by: Christopher Guindon <chris.guindon@eclipse-foundation.org>
diff --git a/download.php b/download.php
index 1dd8d39..ebac7d2 100755
--- a/download.php
+++ b/download.php
@@ -227,6 +227,14 @@
   $dbc_RW   = new DBConnectionRW();
   $dbh_RW    = $dbc_RW->connect();
 
+  if ($dbh_RW->connect_error) {
+    // Connection failed
+    error_log('Connection failed: ' . $dbh_RW->connect_error);
+  } else {
+    // Connection succeeded
+    error_log('Connection successful');
+  }
+
   $app = new App();
 
   # Process an incoming request for a committers-only download
@@ -600,16 +608,6 @@
     }
   }
 
-
-
-  $dbc_RW->disconnect();  # disconnects all pending DB connections
-  $rs   = null;
-  $dbh_RW  = null;
-  $dbc_RW = null;
-  $dbh  = null;
-  $dbc   = null;
-
-
   /**
    *
    * @param $filename - file name portion (relative to http://download.eclipse.org) to inspect
@@ -713,3 +711,11 @@
       return 0;
     }
   }
+
+
+  $dbc_RW->disconnect();  # disconnects all pending DB connections
+  $rs   = null;
+  $dbh_RW  = null;
+  $dbc_RW = null;
+  $dbh  = null;
+  $dbc   = null;
\ No newline at end of file