diff -r 299a90e28abc -r 87e08a6e4fec install/includes/stages/database_post.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/install/includes/stages/database_post.php Wed Jan 16 13:55:49 2008 -0500 @@ -0,0 +1,168 @@ +connect(true, $db_host, $db_user, $db_pass, $db_name); + +$ui->show_header(); + +if ( $result ) +{ + // We're good, write out a config file + $ch = @fopen( ENANO_ROOT . '/config.new.php', 'w' ); + if ( !$ch ) + { + ?> +
+

Configuration file generation failed.

+

Couldn't open the configuration file to write out database settings. Check your file permissions.

+

+ +

+
+ That table prefix isn\'t going to work.

'; + return true; + } + fwrite($ch, " +

Can't load schema file

+

The SQL schema file couldn't be loaded.

+ $e"; ?> + sql_query('SELECT config_name, config_value FROM ' . $db_prefix . 'config LIMIT 1;'); + if ( !$q ) + { + $sql_parser->assign_vars(array( + 'TABLE_PREFIX' => $db_prefix + )); + $sql = $sql_parser->parse(); + foreach ( $sql as $q ) + { + if ( !$dbal->sql_query($q) ) + { + ?> +
+ + +

Database operation failed

+

The installer couldn't create one of the tables used for installation.

+

Error description: + sql_error(); + ?> +

+

+ +

+
+ free_result(); + if ( !$dbal->sql_query('DELETE FROM ' . $db_prefix . 'config WHERE config_name = \'install_aes_key\';') ) + { + $dbal->_die('install database_post.php trying to remove old AES installer key'); + } + } + $dbal->close(); + ?> +
+ + +

Connection successful

+

The database has been contacted and initial tables created successfully. Redirecting...

+

Click if you're not redirected within 2 seconds

+
+ + +
+ + +

Database connection failed

+

The installer couldn't connect to the database because something went wrong while the connection attempt was being made. Please press your browser's back button and correct your database information.

+

Error description: + sql_error(); + ?> +

+

+ +

+
+