wp-config.php error in wordpress µ installation

wp-config.php error in wordpress µ installation

Recently I had a wordpress µ installation on my college server and I ended up in a typical error which left no clue to know whats actually  happening,the problem  layed out as the following.After unpacking wordpress µ, and pointing a browser to that location, a page comes up saying simply this:

wp-config

It also has a button saying "Create a Configuration File", but when this is pressed, nothing happens.I was reminding myself that "I had done a numerous wordpress installation and why wordpress µ makes a difference.I was rechecking whether I did a mistake in server configuration or file permission etc.., but everything seems correct.I hope what I did was normal.But when I did a debug I got an error from a file called wp-blog-header.php and digging through the code revieled that

"wp-blog-header.php searches for possible wp-config.php files and if it found one it wont create a new wp-config.php in my case I had already installed a wordpress in my root directory."

So I did a small modification in the code and the problem get solved.Thanks to Linda for her help.

Original wp-blog-header.php

 
< ?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
 
if ( !isset($wp_did_header) ) {
// WPMU Runs installer if things aren't set up correctly
if ( !file_exists( dirname(__FILE__) . '/wp-config.php') &amp;amp;&amp;amp; !file_exists( dirname( dirname(__FILE__) ) . '/wp-config.php')) {
if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false) $path = '';
else $path = 'wp-admin/';
include( &quot;index-install.php&quot; ); // install WPMU!
die();
}
 
$wp_did_header = true;
 
require_once( dirname(__FILE__) . '/wp-load.php' );
 
wp();
 
require_once( ABSPATH . WPINC . '/template-loader.php' );
 
}
 
?>
 

Modified wp-blog-header.php

 
< ?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
 
if ( !isset($wp_did_header) ) {
// WPMU Runs installer if things aren't set up correctly
if ( !file_exists( dirname(__FILE__) . '/wp-config.php') ) {
if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false) $path = '';
else $path = 'wp-admin/';
include( &quot;index-install.php&quot; ); // install WPMU!
die();
}
 
$wp_did_header = true;
 
require_once( dirname(__FILE__) . '/wp-load.php' );
 
wp();
 
require_once( ABSPATH . WPINC . '/template-loader.php' );
 
}
 
?>
 

Similar Posts:

Subscribe to 45K Blog via RSS
Or Subscribe via E-Mail

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment