Fixed a few (more) MySQL issues with the installer and dashes in the database name
authorDan
Thu, 15 Nov 2007 17:52:53 -0500
changeset 255 ba28d43a6b86
parent 237 c26308d81882
child 257 e7bbbb92385b
Fixed a few (more) MySQL issues with the installer and dashes in the database name
install.php
--- a/install.php	Mon Nov 05 20:00:41 2007 -0500
+++ b/install.php	Thu Nov 15 17:52:53 2007 -0500
@@ -670,7 +670,7 @@
           die('root'.$e);
       }
       $rsp = 'good';
-      $q = mysql_query('USE '.$dbname, $conn);
+      $q = mysql_query('USE `' . mysql_real_escape_string($dbname) . '`;', $conn);
       if(!$q)
       {
         $e = mysql_error();
@@ -703,7 +703,7 @@
         else
           die('auth'.$e);
       }
-      $q = mysql_query('USE '.$dbname, $conn);
+      $q = mysql_query('USE `' . mysql_real_escape_string($dbname) . '`;', $conn);
       if(!$q)
       {
         $e = mysql_error();
@@ -1154,7 +1154,7 @@
        If you need to modify MySQL and then distribute your modifications, you must either distribute them under the terms of the GPL
        or purchase a proprietary license.</p>
     <?php
-    if ( file_exists('/etc/enano-is-virt-appliance') )
+    if ( @file_exists('/etc/enano-is-virt-appliance') )
     {
       echo '<p><b>MySQL login information for this virtual appliance:</b><br /><br />Database hostname: localhost<br />Database login: username "enano", password: "clurichaun" (without quotes)<br />Database name: enano_www1</p>';
     }