summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-07-21 10:37:55 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-07-21 10:37:55 +0000
commit65f4c3a448939d8a208ab48f5c165d0ac15a2760 (patch)
treea5f4690bf1cb65bfda56a961e664067a6594a3bb /index.php
parentb499b71f2261a660bfb691e225921188e46f61f5 (diff)
downloadwordpress-mu-65f4c3a448939d8a208ab48f5c165d0ac15a2760.tar.gz
wordpress-mu-65f4c3a448939d8a208ab48f5c165d0ac15a2760.tar.xz
wordpress-mu-65f4c3a448939d8a208ab48f5c165d0ac15a2760.zip
If .htaccess can't be created then abort with a helpful message!
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@59 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'index.php')
-rw-r--r--index.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/index.php b/index.php
index 7701faf..1276e0f 100644
--- a/index.php
+++ b/index.php
@@ -99,7 +99,7 @@ function do_htaccess( $oldfilename, $newfilename, $realpath, $base, $url )
}
if( is_file( $oldfilename ) )
{
- $fp = fopen( $oldfilename, "r" );
+ $fp = @fopen( $oldfilename, "r" );
if( $fp )
{
while( !feof( $fp ) )
@@ -113,7 +113,14 @@ function do_htaccess( $oldfilename, $newfilename, $realpath, $base, $url )
$fp = fopen( $newfilename, "w" );
fwrite( $fp, $htaccess );
fclose( $fp );
- }
+ } else {
+ print "<p>There was a problem creating the .htaccess file in $realpath. Please ensure that the webserver can write to this directory.</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>REALPATH by $realpath</li><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>";
+ die( "Installation Aborted!" );
+ }
}
}