summaryrefslogtreecommitdiffstats
path: root/index-install.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-08-22 16:50:29 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-08-22 16:50:29 +0000
commitf2d057d7cead0e70de2d686c12401ce457f27f00 (patch)
tree26429378a5ea02289204bcd2ca785681e3767a9c /index-install.php
parentc194d2cfefad1ba16fd8f4ce0b1c02509c0feea1 (diff)
downloadwordpress-mu-f2d057d7cead0e70de2d686c12401ce457f27f00.tar.gz
wordpress-mu-f2d057d7cead0e70de2d686c12401ce457f27f00.tar.xz
wordpress-mu-f2d057d7cead0e70de2d686c12401ce457f27f00.zip
xhtml fixes by momo360modena, fixes #709. Not all changes applied however.
git-svn-id: http://svn.automattic.com/wordpress-mu/branches/2.6@1431 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'index-install.php')
-rw-r--r--index-install.php423
1 files changed, 236 insertions, 187 deletions
diff --git a/index-install.php b/index-install.php
index e1788fa..3e9d08a 100644
--- a/index-install.php
+++ b/index-install.php
@@ -2,71 +2,73 @@
// don't ever call this file directly!
if( strpos( $_SERVER["REQUEST_URI"], 'index-install.php' ) ) {
header( "Location: index.php" );
- die();
+ exit();
}
+
if( $_SERVER[ 'HTTP_HOST' ] == 'localhost' ) {
- die( "<h2>Warning!</h2> Installing to http://localhost/ is not supported. Please use <a href='http://localhost.localdomain/'>http://localhost.localdomain/</a> instead." );
+ die( "<h2>Warning!</h2><p>Installing to http://localhost/ is not supported. Please use <a href='http://localhost.localdomain/'>http://localhost.localdomain/</a> instead.</p>" );
}
+
define('WP_INSTALLING', true);
$dirs = array( dirname(__FILE__), dirname(__FILE__) . "/wp-content/" );
function printheader() {
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>WordPress &rsaquo; Installation</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <style media="screen" type="text/css">
- html {
- background: #eee;
- }
- body {
- background: #fff;
- color: #000;
- font-family: Georgia, "Times New Roman", Times, serif;
- margin-left: 20%;
- margin-right: 20%;
- padding: .2em 2em;
- }
-
- h1, h2 {
- color: #006;
- font-size: 18px;
- font-weight: lighter;
- }
-
- p, li, dt {
- line-height: 140%;
- padding-bottom: 2px;
- }
-
- ul, ol {
- padding: 5px 5px 5px 20px;
- }
- #logo {
- margin-bottom: 2em;
- }
-.step a, .step input {
- font-size: 2em;
-}
-.step, th {
- text-align: right;
-}
-#footer {
-text-align: center; border-top: 1px solid #ccc; padding-top: 1em; font-style: italic;
-}
-.fakelink {
- color: #00a;
- text-decoration: underline;
-}
- </style>
-</head>
-<body>
+ ?>
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>WordPress &rsaquo; Installation</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <style media="screen" type="text/css">
+ html {
+ background: #eee;
+ }
+ body {
+ background: #fff;
+ color: #000;
+ font-family: Georgia, "Times New Roman", Times, serif;
+ margin-left: 20%;
+ margin-right: 20%;
+ padding: .2em 2em;
+ }
-<h1><img src="wp-includes/images/wordpress-mu.png" alt="WordPress &micro;" /></h1>
-<?php
+ h1, h2 {
+ color: #006;
+ font-size: 18px;
+ font-weight: lighter;
+ }
+
+ p, li, dt {
+ line-height: 140%;
+ padding-bottom: 2px;
+ }
+
+ ul, ol {
+ padding: 5px 5px 5px 20px;
+ }
+ #logo {
+ margin-bottom: 2em;
+ }
+ .step a, .step input {
+ font-size: 2em;
+ }
+ .step, th {
+ text-align: right;
+ }
+ #footer {
+ text-align: center; border-top: 1px solid #ccc; padding-top: 1em; font-style: italic;
+ }
+ .fakelink {
+ color: #00a;
+ text-decoration: underline;
+ }
+ </style>
+ </head>
+ <body>
+ <h1><img src="wp-includes/images/wordpress-mu.png" alt="WordPress &micro;" /></h1>
+ <?php
}
function filestats( $err ) {
@@ -74,10 +76,11 @@ function filestats( $err ) {
print "<p>If you post a message to the &micro; support forum at <a target='_blank' href='http://mu.wordpress.org/forums/'>http://mu.wordpress.org/forums/</a> then copy and paste the following information into your message:</p>";
print "<blockquote style='background: #eee; border: 1px solid #333; padding: 5px;'>";
- print "<br /><strong>ERROR: $err</strong></br >";
+ print "<br /><strong>ERROR: $err</strong><br />";
clearstatcache();
$files = array( "htaccess.dist", ".htaccess" );
- while( list( $key, $val ) = each( $files ) ) {
+
+ foreach ( (array) $files as $val ) {
$stats = @stat( $val );
if( $stats ) {
print "<h2>$val</h2>";
@@ -92,7 +95,7 @@ function filestats( $err ) {
print "<br />";
} elseif( file_exists( $val ) == false ) {
print "<h2>$val</h2>";
- print "&nbsp;&nbsp;&nbsp;&nbsp;FILE NOT FOUND: $val<br>";
+ print "&nbsp;&nbsp;&nbsp;&nbsp;FILE NOT FOUND: $val<br />";
}
}
print "</blockquote>";
@@ -153,56 +156,79 @@ function do_htaccess( $oldfilename, $newfilename, $base, $url ) {
print "<p>Please ensure that the webserver can write to this directory.</p>";
print "<p>If you use Cpanel then read <a href='http://mu.wordpress.org/forums/topic.php?id=99'>this post</a>. Cpanel creates files that I need to overwrite and you have to fix that.</p>";
print "<p>If all else fails then you'll have to create it by hand:";
- print "<ul><li> Download htaccess.dist to your computer and open it in your favourite text editor.</li>
- <li> Replace the following text:<ul><li>BASE by '$base'</li><li>HOST by '$url'</li></li>
- <li> Rename htaccess.dist to .htaccess and upload it back to the same directory.</li></ul>";
+ print "<ul>
+ <li> Download htaccess.dist to your computer and open it in your favourite text editor.</li>
+ <li> Replace the following text:
+ <ul>
+ <li>BASE by '$base'</li>
+ <li>HOST by '$url'</li>
+ </ul>
+ </li>
+ <li> Rename htaccess.dist to .htaccess and upload it back to the same directory.</li>
+ </ul>";
die( "Installation Aborted!" );
}
}
function checkdirs() {
global $dirs;
+ $return = true;
- $ret = true;
- foreach( $dirs as $dir ) {
+ $errors = array();
+ foreach( (array) $dirs as $dir ) {
if( false == is_writeable( $dir ) ) {
- $err[] = $dir;
+ $errors[] = $dir;
}
}
- if( is_array( $err ) ) {
- ?><h2>Warning!</h2>
+ if( !empty( $errors ) ) {
+ ?>
+ <h2>Warning!</h2>
<div style='border: 1px solid #ccc'>
- <p style='font-weight: bold; padding-left: 10px'>One or more of the directories must be made writeable by the webserver. You will be reminded to reset the permissions at the end of the install.<br>
- Please <code>chmod 777 <q>directory-name</q></code> or <code>chown</code> that directory to the user the web server runs as (usually nobody, apache, or www-data)<br>
- Refresh this page when you're done!<br></p>
+ <p style='font-weight: bold; padding-left: 10px'>One or more of the directories must be made writeable by the webserver. You will be reminded to reset the permissions at the end of the install.<br />
+ Please <code>chmod 777 <q>directory-name</q></code> or <code>chown</code> that directory to the user the web server runs as (usually nobody, apache, or www-data)<br />
+ Refresh this page when you're done!<br /></p>
</div>
<p>Quick fix:<br /> <code>chmod&nbsp;777&nbsp;<?php
- foreach( $err as $dir ) {
+ foreach( $errors as $dir ) {
echo "$dir&nbsp;";
}
- ?></code></p><?php
- $ret = false;
+ ?></code>
+ </p>
+ </div>
+ <?php
+ $return = false;
}
+
if( file_exists( "./.htaccess" ) && is_writeable( "./.htaccess" ) == false ) {
- $ret = false;
- print "<h2>Warning! .htaccess already exists.</h2>";
- print "<div style='border: 1px solid #ccc'>";
- print "<p style='font-weight: bold; padding-left: 10px'>A file with the name '.htaccess' already exists in this directory and I cannot write to it. Please ftp to the server and delete this file from this directory!<br />";
- print "Offending file: " . realpath( '.htaccess' ) . "</p>";
- print "</div>";
+ ?>
+ <h2>Warning! .htaccess already exists.</h2>
+ <div style='border: 1px solid #ccc'>
+ <p style='font-weight: bold; padding-left: 10px'>A file with the name '.htaccess' already exists in this directory and I cannot write to it. Please ftp to the server and delete this file from this directory!<br />Offending file: <?php echo realpath( '.htaccess' ); ?></p>
+ </div>
+ <?php
+ $return = false;
}
- return $ret;
+
+ return $return;
}
function step1() {
- ?><h2>Installing WordPress &micro;</h2>
+ ?>
+ <h2>Installing WordPress &micro;</h2>
<p><strong>Welcome to WordPress &micro;.</strong> I will help you install this software by asking you a few questions and asking that you change the permissions on a few directories so I can create configuration files and make a directory to store all your uploaded files.</p>
<p>If you have installed the single-blog version of WordPress before, please note that the WordPress &micro; installer is different and trying to create the configuration file wp-config.php youself may result in a broken site. It's much easier to use this installer to get the job done.</p>
+
<h3>What do I need?</h3>
- <p><ul><li>Access to your server to change directory permissions. This can be done through ssh or ftp for example.</li><li>A valid email where your password and administrative emails will be sent.</li><li>An empty MySQL database.Tables are prefixed with <code>wp_</code> which may conflict with an existing WordPress install.</li><li> Wildcard dns records if you're going to use the virtual host functionality. Check the <a href='http://trac.mu.wordpress.org/browser/trunk/README.txt'>README</a> for further details.</li></ul><p>
+ <ul>
+ <li>Access to your server to change directory permissions. This can be done through ssh or ftp for example.</li>
+ <li>A valid email where your password and administrative emails will be sent.</li>
+ <li>An empty MySQL database.Tables are prefixed with <code>wp_</code> which may conflict with an existing WordPress install.</li>
+ <li> Wildcard dns records if you're going to use the virtual host functionality. Check the <a href='http://trac.mu.wordpress.org/browser/trunk/README.txt'>README</a> for further details.</li>
+ </ul>
<?php
$mod_rewrite_msg = "<p>If the <code>mod_rewrite</code> module is disabled ask your administrator to enable that module, or look at the <a href='http://httpd.apache.org/docs/mod/mod_rewrite.html'>Apache documentation</a> or <a href='http://www.google.com/search?q=apache+mod_rewrite'>elsewhere</a> for help setting it up.</p>";
+
if( function_exists( "apache_get_modules" ) ) {
$modules = apache_get_modules();
if( in_array( "mod_rewrite", $modules ) == false ) {
@@ -212,6 +238,7 @@ function step1() {
?><p>Please make sure <code>mod_rewrite</code> is installed as it will be activated at the end of this install.</p><?php
echo $mod_rewrite_msg;
}
+
if( checkdirs() == false ) {
return false;
}
@@ -221,12 +248,11 @@ function step1() {
$url = stripslashes( "http://".$_SERVER["SERVER_NAME"] . dirname( $_SERVER[ "SCRIPT_NAME" ] ) );
if( substr( $url, -1 ) == '/' )
- $url = substr( $url, 0, -1 );
+ $url = substr( $url, 0, -1 );
$base = stripslashes( dirname( $_SERVER["SCRIPT_NAME"] ) );
if( $base != "/") {
$base .= "/";
}
- $realpath = dirname(__FILE__);
return true;
}
@@ -237,64 +263,72 @@ function printstep1form( $dbname = 'wordpress', $uname = 'username', $pwd = 'pas
$hostname = $_SERVER[ 'HTTP_HOST' ];
if( substr( $_SERVER[ 'HTTP_HOST' ], 0, 4 ) == 'www.' )
$hostname = str_replace( "www.", "", $_SERVER[ 'HTTP_HOST' ] );
- ?>
- <form method='post' action='index.php'>
- <input type='hidden' name='action' value='step2'>
- <h2>Blog Addresses</h2>
- <p>Please choose whether you would like blogs for the WordPress &micro; install to use sub-domains or sub-directories. You can not change this later. We recommend sub-domains.</p>
- <p><label><input type='radio' name='vhost' value='yes' <?php if( $vhost == 'yes' ) echo 'checked '; ?> /> Sub-domains (like <code>blog1.example.com</code>)</label><br />
- <label><input type='radio' name='vhost' value='no' <?php if( $vhost == 'no' ) echo 'checked '; ?> /> Sub-directories (like <code>example.com/blog1</code></label></p>
-
- <h2>Database</h2>
-
- <p>Below you should enter your database connection details. If you're not sure about these, contact your host. </p>
- <table cellpadding='5'>
- <tr>
- <th scope='row' width='33%'>Database Name</th>
- <td><input name='dbname' type='text' size='45' value='<?php echo $dbname ?>' /></td>
- </tr>
- <tr>
- <th scope='row'>User Name</th>
- <td><input name='uname' type='text' size='45' value='<?php echo $uname ?>' /></td>
- </tr>
- <tr>
- <th scope='row'>Password</th>
- <td><input name='pwd' type='text' size='45' value='<?php echo $pwd ?>' /></td>
- </tr>
- <tr>
- <th scope='row'>Database Host</th>
- <td><input name='dbhost' type='text' size='45' value='<?php echo $dbhost ?>' /></td>
- </tr>
- </table>
- <h2>Server Address</h2>
- <p><label>What is the Internet address of your site? You should enter the shortest address possible. For example, use <em>example.com</em> instead of <em>www.example.com</em> but if you are going to use an address like <em>blogs.example.com</em> then enter that unaltered in the box below.<br /><b>Server Address:</b> <input type='text' name='basedomain' value='<?php echo $hostname ?>'></label></p>
- <h2>Site Details</h2>
- <table width='100%'>
- <tr>
- <th scope='row'>Site&nbsp;Title</th>
- <td><input name='weblog_title' type='text' size='45' value='<?php echo $weblog_title ?>' /></td>
- <td>What would you like to call your site? </td>
- </tr>
- <tr>
- <th scope='row'>Email</th>
- <td><input name='email' type='text' size='45' value='<?php echo $email ?>' /></td>
- <td>Your email address.</td>
- </tr>
- </table>
- <p class='submit'><input name='submit' type='submit' value='Submit' /> </p>
-</form>
-<?php
+ ?>
+ <form method='post' action='index.php'>
+ <input type='hidden' name='action' value='step2' />
+ <h2>Blog Addresses</h2>
+ <p>Please choose whether you would like blogs for the WordPress &micro; install to use sub-domains or sub-directories. You can not change this later. We recommend sub-domains.</p>
+ <p>
+ <label><input type='radio' name='vhost' value='yes' <?php if( $vhost == 'yes' ) echo 'checked="checked"'; ?> /> Sub-domains (like <code>blog1.example.com</code>)</label><br />
+ <label><input type='radio' name='vhost' value='no' <?php if( $vhost == 'no' ) echo 'checked="checked"'; ?> /> Sub-directories (like <code>example.com/blog1</code></label>
+ </p>
+
+ <h2>Database</h2>
+
+ <p>Below you should enter your database connection details. If you're not sure about these, contact your host.</p>
+ <table cellpadding='5'>
+ <tr>
+ <th scope='row' width='33%'>Database Name</th>
+ <td><input name='dbname' type='text' size='45' value='<?php echo $dbname ?>' /></td>
+ </tr>
+ <tr>
+ <th scope='row'>User Name</th>
+ <td><input name='uname' type='text' size='45' value='<?php echo $uname ?>' /></td>
+ </tr>
+ <tr>
+ <th scope='row'>Password</th>
+ <td><input name='pwd' type='text' size='45' value='<?php echo $pwd ?>' /></td>
+ </tr>
+ <tr>
+ <th scope='row'>Database Host</th>
+ <td><input name='dbhost' type='text' size='45' value='<?php echo $dbhost ?>' /></td>
+ </tr>
+ </table>
+
+ <h2>Server Address</h2>
+ <p><label>What is the Internet address of your site? You should enter the shortest address possible. For example, use <em>example.com</em> instead of <em>www.example.com</em> but if you are going to use an address like <em>blogs.example.com</em> then enter that unaltered in the box below.<br />
+ <label><strong>Server Address:</strong> <input type='text' name='basedomain' value='<?php echo $hostname ?>'></label>
+ </p>
+
+ <h2>Site Details</h2>
+ <table width='100%'>
+ <tr>
+ <th scope='row'>Site&nbsp;Title</th>
+ <td><input name='weblog_title' type='text' size='45' value='<?php echo $weblog_title ?>' /></td>
+ <td>What would you like to call your site? </td>
+ </tr>
+ <tr>
+ <th scope='row'>Email</th>
+ <td><input name='email' type='text' size='45' value='<?php echo $email ?>' /></td>
+ <td>Your email address.</td>
+ </tr>
+ </table>
+ <p class='submit'><input name='submit' type='submit' value='Submit' /></p>
+ </form>
+ <?php
}
function step2() {
- global $wpdb, $table_prefix, $base, $blog_id;
- $dbname = $_POST['dbname'];
- $uname = $_POST['uname'];
- $passwrd = $_POST['pwd'];
- $dbhost = $_POST['dbhost'];
- $vhost = $_POST['vhost' ];
- $prefix = 'wp_';
- $base = stripslashes( dirname( $_SERVER["SCRIPT_NAME"] ) );
+ global $base, $wpdb;
+
+ $dbname = stripslashes($_POST['dbname']);
+ $uname = stripslashes($_POST['uname']);
+ $passwrd = stripslashes($_POST['pwd']);
+ $dbhost = stripslashes($_POST['dbhost']);
+ $vhost = stripslashes($_POST['vhost' ]);
+ $prefix = 'wp_'; // Hardcoded
+
+ $base = stripslashes( dirname($_SERVER["SCRIPT_NAME"]) );
if( $base != "/")
$base .= "/";
@@ -307,15 +341,15 @@ function step2() {
if (!file_exists('wp-config-sample.php'))
die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.');
- $configFile = file('wp-config-sample.php');
+ $wp_config_file = file('wp-config-sample.php');
// We'll fail here if the values are no good.
require_once('wp-includes/wp-db.php');
printheader();
$handle = fopen('wp-config.php', 'w');
- foreach ($configFile as $line_num => $line) {
- switch (trim( substr($line,0,16) )) {
+ foreach ($wp_config_file as $line) {
+ switch ( trim( substr($line,0,16) ) ) {
case "define('DB_NAME'":
fwrite($handle, str_replace("wordpress", $dbname, $line));
break;
@@ -390,8 +424,8 @@ Your new SITE_NAME blog has been successfully set up at:
BLOG_URL
You can log in to the administrator account with the following information:
- Username: USERNAME
- Password: PASSWORD
+Username: USERNAME
+Password: PASSWORD
Login Here: BLOG_URLwp-login.php
We hope you enjoy your new blog.
@@ -399,7 +433,6 @@ Thanks!
--The Team @ SITE_NAME')" );
$wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'first_post', 'Welcome to <a href=\"SITE_URL\">SITE_NAME</a>. This is your first post. Edit or delete it, then start blogging!' )" );
-
$weblog_title = stripslashes( $_POST[ 'weblog_title' ] );
$pass = substr( md5( rand() ), 5, 12 );
@@ -412,38 +445,49 @@ Thanks!
wpmu_create_blog( $domain, $base, $weblog_title, $user_id, array( 'blog_public' => 1, 'public' => 1 ) );
update_blog_option( 1, 'template', 'home');
update_blog_option( 1, 'stylesheet', 'home');
+
if( constant( 'VHOST' ) == 'yes' ) {
update_blog_option( 1, 'permalink_structure', '/%year%/%monthnum%/%day%/%postname%/');
} else {
update_blog_option( 1, 'permalink_structure', '/blog/%year%/%monthnum%/%day%/%postname%/');
}
+
update_blog_option( 1, 'rewrite_rules', '');
+
$msg = "Your new WordPress MU site has been created at\nhttp://{$domain}{$base}\n\nLogin details:\nUsername: admin\nPassword: $pass\nLogin: http://{$domain}{$base}wp-login.php\n";
wp_mail( $email, "Your new WordPress MU site is ready!", $msg, "From: wordpress@" . $_SERVER[ 'HTTP_HOST' ] );
?><h2>Installation Finished!</h2>
- <p>Congratulations! Your <a href='http://<?php echo $domain . $base; ?>'>WordPress &micro; site</a> has been configured.</p>
+ <p>Congratulations! <br />Your <a href='http://<?php echo $domain . $base; ?>'>WordPress &micro; site</a> has been configured.</p>
<p>You can <a href='wp-login.php'>log in</a> using the username "admin" and password <?php echo $pass; ?></p>
<h3>Directory Permissions</h3>
- <p>Please remember to reset the permissions on the following directories:<ul>
- <?php
- reset( $dirs );
- foreach( $dirs as $dir ) {
- echo "<li> $dir</li>";
- }
- ?></ul></p>
- <p>You can probably use the following command to fix the permissions but check with your host if it doubt:<br /><code>chmod&nbsp;755&nbsp;<?php
- reset( $dirs );
- foreach( $dirs as $dir ) {
- echo "$dir&nbsp;";
- }
- ?></code></p>
- <h3>Further reading</h3>
- <p><ul><li>If you run into problems, please search the <a href='http://mu.wordpress.org/forums/'>WordPress &micro; Forums</a> where you will most likely find a solution. Please don't post there before searching. It's not polite.</li>
- <li>There is also the <a href='http://trac.mu.wordpress.org/'>WordPress &micro; Trac</a>. That's our bug tracker.</li></ul></p>
- <p>Thanks for installing WordPress &micro;!<br /><br />
+ <p>Please remember to reset the permissions on the following directories:
+ <ul>
+ <?php
+ reset( $dirs );
+ foreach( (array) $dirs as $dir ) {
+ echo "<li>$dir</li>";
+ }
+ ?>
+ </ul>
+ </p>
+ <p>You can probably use the following command to fix the permissions but check with your host if it doubt:
+ <br /><code>chmod&nbsp;755&nbsp;
+ <?php
+ reset( $dirs );
+ foreach( (array) $dirs as $dir ) {
+ echo "$dir&nbsp;";
+ }
+ ?></code>
+ </p>
- Donncha<br />
- <code>wpmu version: <?php echo $wpmu_version ?></code></p>
+ <h3>Further reading</h3>
+ <p>
+ <ul>
+ <li>If you run into problems, please search the <a href='http://mu.wordpress.org/forums/'>WordPress &micro; Forums</a> where you will most likely find a solution. Please don't post there before searching. It's not polite.</li>
+ <li>There is also the <a href='http://trac.mu.wordpress.org/'>WordPress &micro; Trac</a>. That's our bug tracker.</li>
+ </ul>
+ </p>
+ <p>Thanks for installing WordPress &micro;!<br /><br />Donncha<br /><code>wpmu version: <?php echo $wpmu_version ?></code></p>
<?php
}
@@ -452,20 +496,24 @@ function nowww() {
?>
<h1>No-www</h1>
<p>WordPress &micro; strips the string "www" from the URLs of sites using this software. It is still possible to visit your site using the "www" prefix with an address like <em><?php echo $_POST[ 'basedomain' ] ?></em> but any links will not have the "www" prefix. They will instead point at <?php echo $nowww ?>.</p>
- <p>The preferred method of hosting blogs is without the "www" prefix as it's more compact and simple.</p><p>You can still use "<?php echo $_POST[ 'basedomain' ] ?>" and URLs like "www.blog1.<?php echo $nowww; ?>" to address your site and blogs after installation but internal links will use the <?php echo $nowww ?> format.</p>
- <p><a target='_blank' href="http://no-www.org/">www. is depreciated</a> has a lot more information on why 'www.' isn't needed any more.</p>
- <p><form method='POST'>
- <input type='hidden' name='dbname' value='<?php echo $_POST[ 'dbname' ]; ?>'>
- <input type='hidden' name='uname' value='<?php echo $_POST[ 'uname' ]; ?>'>
- <input type='hidden' name='pwd' value='<?php echo $_POST[ 'pwd' ]; ?>'>
- <input type='hidden' name='dbhost' value='<?php echo $_POST[ 'dbhost' ]; ?>'>
- <input type='hidden' name='vhost' value='<?php echo $_POST[ 'vhost' ]; ?>'>
- <input type='hidden' name='weblog_title' value='<?php echo $_POST[ 'weblog_title' ]; ?>'>
- <input type='hidden' name='email' value='<?php echo $_POST[ 'email' ]; ?>'>
- <input type='hidden' name='action' value='step2'>
- <input type='hidden' name='basedomain' value='<?echo $nowww ?>'>
- <input type='submit' value='Continue'>
- </form></p>
+ <p>The preferred method of hosting blogs is without the "www" prefix as it's more compact and simple.</p>
+ <p>You can still use "<?php echo $_POST[ 'basedomain' ] ?>" and URLs like "www.blog1.<?php echo $nowww; ?>" to address your site and blogs after installation but internal links will use the <?php echo $nowww ?> format.</p>
+
+ <p><a href="http://no-www.org/">www. is depreciated</a> has a lot more information on why 'www.' isn't needed any more.</p>
+ <p>
+ <form method='post'>
+ <input type='hidden' name='dbname' value='<?php echo $_POST[ 'dbname' ]; ?>' />
+ <input type='hidden' name='uname' value='<?php echo $_POST[ 'uname' ]; ?>' />
+ <input type='hidden' name='pwd' value='<?php echo $_POST[ 'pwd' ]; ?>' />
+ <input type='hidden' name='dbhost' value='<?php echo $_POST[ 'dbhost' ]; ?>' />
+ <input type='hidden' name='vhost' value='<?php echo $_POST[ 'vhost' ]; ?>' />
+ <input type='hidden' name='weblog_title' value='<?php echo $_POST[ 'weblog_title' ]; ?>' />
+ <input type='hidden' name='email' value='<?php echo $_POST[ 'email' ]; ?>' />
+ <input type='hidden' name='action' value='step2' />
+ <input type='hidden' name='basedomain' value='<?echo $nowww ?>' />
+ <input type='submit' value='Continue' />
+ </form>
+ </p>
<?php
}
@@ -477,23 +525,24 @@ switch($action) {
nowww();
continue;
}
- // get blog username
- // create wp-config.php
+
+ // get blog username, create wp-config.php
step2();
+
// Install Blog!
include_once('./wp-config.php');
include_once('./wp-admin/includes/upgrade.php');
- // normalise hostname - no www.
- $_SERVER[ 'HTTP_HOST' ] = str_replace( 'www.', '', $_SERVER[ 'HTTP_HOST' ] );
+
+ $_SERVER[ 'HTTP_HOST' ] = str_replace( 'www.', '', $_SERVER[ 'HTTP_HOST' ] ); // normalise hostname - no www.
make_db_current_silent();
populate_options();
+ global $base;
do_htaccess( 'htaccess.dist', '.htaccess', $base, '');
+
step3();
break;
default:
- // check that directories are writeable.
- // create wpmu-settings.php
- // get db auth info.
+ // check that directories are writeable, create wpmu-settings.php and get db auth info
printheader();
if( step1() ) {
printstep1form();
@@ -503,7 +552,7 @@ switch($action) {
?>
<br /><br />
<div style="text-align:center;">
-<a href="http://mu.wordpress.org/">WordPress &micro;</a> | <a href="http://mu.wordpress.org/forums/">Support Forums</a>
+ <a href="http://mu.wordpress.org/">WordPress &micro;</a> | <a href="http://mu.wordpress.org/forums/">Support Forums</a>
</div>
</body>
</html>