From 6d4302fe06be6a62610bed5a8a6bfd599f1906aa Mon Sep 17 00:00:00 2001 From: saxmatt Date: Fri, 23 May 2003 11:07:05 +0000 Subject: [PATCH] New installation. git-svn-id: http://svn.automattic.com/wordpress/trunk@45 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/wp-install.php | 329 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 329 insertions(+) create mode 100644 wp-admin/wp-install.php diff --git a/wp-admin/wp-install.php b/wp-admin/wp-install.php new file mode 100644 index 0000000000..e04277e47a --- /dev/null +++ b/wp-admin/wp-install.php @@ -0,0 +1,329 @@ +$msg

"; + echo "

query:
$sql

"; + echo "

error:
$error

"; + die(); +} + +$connexion = mysql_connect($server, $loginsql, $passsql) or die("Can't connect to the database
".mysql_error()); +$dbconnexion = mysql_select_db($base, $connexion); + +if (!$dbconnexion) { + echo mysql_error(); + die(); +} +if (!step) $step = 0; +?> + + + WordPress > Installation + + + + +

WordPress

+ +

Welcome to WordPress. We’re now going to go through a few steps to get + you up and running with the latest in personal publishing platforms. Before + we get started, remember that we require a PHP version of at least 4.0.6, you + have . Look good? You also need to set up the database + connection information in b2config.php. If you’re all done, + let's go!

+ +

Step 1

+

Okay first we're going to set up the links database. This will allow you to host your own blogroll, complete with Weblogs.com updates.

+ +

Installing WP-Links.

+

Checking for tables...

+\n"; +} +if (!$got_cats) { + echo "

Can't find table '$tablelinkcategories', gonna create it...

\n"; + $sql = "CREATE TABLE $tablelinkcategories ( " . + " cat_id int(11) NOT NULL auto_increment, " . + " cat_name tinytext NOT NULL, ". + " auto_toggle enum ('Y','N') NOT NULL default 'N', ". + " PRIMARY KEY (cat_id) ". + ") "; + $result = mysql_query($sql) or print ("Can't create the table '$tablelinkcategories' in the database.
" . $sql . "
" . mysql_error()); + if ($result != false) { + echo "

Table '$tablelinkcategories' created OK

\n"; + $got_cats = true; + } +} else { + echo "

Found table '$tablelinkcategories', don't need to create it...

\n"; + $got_cats = true; +} +if (!$got_links) { + echo "

Can't find '$tablelinks', gonna create it...

\n"; + $sql = "CREATE TABLE $tablelinks ( " . + " link_id int(11) NOT NULL auto_increment, " . + " link_url varchar(255) NOT NULL default '', " . + " link_name varchar(255) NOT NULL default '', " . + " link_image varchar(255) NOT NULL default '', " . + " link_target varchar(25) NOT NULL default '', " . + " link_category int(11) NOT NULL default 0, " . + " link_description varchar(255) NOT NULL default '', " . + " link_visible enum ('Y','N') NOT NULL default 'Y', " . + " link_owner int NOT NULL DEFAULT '1', " . + " link_rating int NOT NULL DEFAULT '0', " . + " link_updated DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', " . + " link_rel varchar(255) NOT NULL default '', " . + " PRIMARY KEY (link_id) " . + ") "; + $result = mysql_query($sql) or print ("Can't create the table '$tablelinks' in the database.
" . $sql . "
" . mysql_error()); + if ($result != false) { + echo "

Table '$tablelinks' created OK

\n"; + $got_links = true; + } +} else { + echo "

Found table '$tablelinks', don't need to create it...

\n"; + $got_links = true; +} + +if ($got_links && $got_cats) { + echo "

Looking for category 1...

\n"; + $sql = "SELECT * FROM $tablelinkcategories WHERE cat_id=1 "; + $result = mysql_query($sql) or print ("Can't query '$tablelinkcategories'.
" . $sql . "
" . mysql_error()); + if ($result != false) { + if ($row = mysql_fetch_object($result)) { + echo "

You have at least 1 category. Good!

\n"; + $got_row = true; + } else { + echo "

Gonna insert category 1...

\n"; + $sql = "INSERT INTO $tablelinkcategories (cat_id, cat_name) VALUES (1, 'General')"; + $result = mysql_query($sql) or print ("Can't query insert category.
" . $sql . "
" . mysql_error()); + if ($result != false) { + echo "

Inserted category Ok

\n"; + $got_row = true; + } + } + } +} + +if ($got_row) { + echo "

All done!

\n"; +} +?> +

Did you defeat the boss monster at the end? Good, then go on to Step + 2.

+ +

Step 2

+

First we’re going to create the necessary tables in the database...

+ + + +

The first table has been created! ...

+ + + +

The test post has been inserted correctly...

+ + + +

Categories are up and running...

+ +To delete a comment, just log in, and view the posts\' comments, there you will have the option to edit or delete them.')"; +$q = mysql_query($query) or mysql_doh("doh, can't insert a first comment in the table \"$tablecomments\" in the database.", $query, mysql_error()); +?> + +

Comments are groovy...

+ + + +

Settings are okay.

+ + + +

User setup successful!

+ +

Now you can log in with the login + "admin" and password "".

+

Note that password carefully! It is a random + password that was generated just for you. If you lose it, you + will have to delete the tables from the database yourself, and re-install WordPress. +

+

Were you expecting more steps? Sorry to disappoint. All done!

+ + + \ No newline at end of file