diff options
-rw-r--r-- | install.php | 10 | ||||
-rw-r--r-- | lib/install.php | 2 | ||||
-rw-r--r-- | templates/show_install_config.inc.php | 8 |
3 files changed, 15 insertions, 5 deletions
diff --git a/install.php b/install.php index 9741df62..a544b2ce 100644 --- a/install.php +++ b/install.php @@ -87,7 +87,15 @@ switch ($_REQUEST['action']) { break; case 'create_config': - $created_config = install_create_config($web_path,$username,$password,$hostname,$database); + + // Test and make sure that the values they give us actually work + if (!check_database($hostname,$username,$password)) { + Error::add('config',_('Error: Unable to make Database Connection') . mysql_error()); + } + + if (!Error::occurred()) { + $created_config = install_create_config($web_path,$username,$password,$hostname,$database); + } require_once 'templates/show_install_config.inc.php'; break; diff --git a/lib/install.php b/lib/install.php index 965186f7..5602b348 100644 --- a/lib/install.php +++ b/lib/install.php @@ -132,7 +132,7 @@ function install_insert_db($username,$password,$hostname,$database) { $dbh = Dba::dbh(); if (!is_resource($dbh)) { - Error::add('general','Error: Unable to make Database Connection ' . mysql_error()); + Error::add('general',_('Error: Unable to make Database Connection') . mysql_error()); return false; } diff --git a/templates/show_install_config.inc.php b/templates/show_install_config.inc.php index ef8d861f..7586cf9b 100644 --- a/templates/show_install_config.inc.php +++ b/templates/show_install_config.inc.php @@ -54,9 +54,11 @@ if (INSTALL != '1') { exit; } <?php echo _("Step 3 - Setup Initial Account"); ?><br /> <?php Error::display('general'); ?> <br /> - <span class="header2"><?php echo _('Generate Config File'); ?></span> - <form method="post" action="<?php echo WEB_PATH . "?action=create_config"; ?>" enctype="multipart/form-data" > - <table> + +<span class="header2"><?php echo _('Generate Config File'); ?></span> +<?php Error::display('config'); ?> +<form method="post" action="<?php echo WEB_PATH . "?action=create_config"; ?>" enctype="multipart/form-data" > +<table> <tr> <td class="align"><?php echo _('Web Path'); ?></td> <td class="align"><input type="text" name="web_path" value="<?php echo $web_path; ?>" /></td> |