From 65954a35b9262e8d512a54e1d60ec7898848c96c Mon Sep 17 00:00:00 2001 From: james Date: Mon, 6 Jun 2005 17:19:17 +0000 Subject: [PATCH] Fix the file that gets imported for step 2, add more checking to step 3 --- install2.php | 2 +- install3.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/install2.php b/install2.php index a4bb7f9..e847108 100644 --- a/install2.php +++ b/install2.php @@ -103,7 +103,7 @@ mysql_select_db($DBNAME); echo "Setting up database tables... "; - system("mysql -h$DBHOST -u$DBUSER -p$DBPASS $DBNAME Done! installed database version $dbcodeversion
\n"; $fp=fopen("db/db.db.version.txt","w"); diff --git a/install3.php b/install3.php index b854cee..2505449 100644 --- a/install3.php +++ b/install3.php @@ -66,6 +66,15 @@ mysql_select_db($DBNAME); //if there are entries in the config table for year=0, then this is NOT a fresh install, so error out $q=mysql_query("SELECT * FROM config WHERE year='0'"); +//we might get an error if the config table does not exist (ie, step 2 failed) +if(mysql_error()) +{ + //we say all tables, but really only we check for config where year=0; + echo "
ERROR: No SFIAB tables detected, It seems like step 2 failed. Please go Back to Installation Step 2 and try again.
"; + echo ""; + exit; + +} if(mysql_num_rows($q)) { //we say all tables, but really only we check for config where year=0;