From 1c0f13ab9aa635b9c942988e34e32abcb40dfbdf Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Wed, 4 Oct 2006 05:32:18 +0000 Subject: [PATCH] missing wp-config.php error uses wp_die() now. props Nazgul. fixes #1936 git-svn-id: https://develop.svn.wordpress.org/trunk@4307 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/install.php | 6 ++++-- wp-blog-header.php | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/wp-admin/install.php b/wp-admin/install.php index cb20653363..baa99770f3 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -1,7 +1,9 @@ wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file."); +if (!file_exists('../wp-config.php')) { + require_once('../wp-includes/functions.php'); + wp_die("There doesn't seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.", "WordPress › Error"); +} require_once('../wp-config.php'); require_once('./upgrade-functions.php'); diff --git a/wp-blog-header.php b/wp-blog-header.php index bf5ea9f69f..e23f21a95a 100644 --- a/wp-blog-header.php +++ b/wp-blog-header.php @@ -4,7 +4,9 @@ if (! isset($wp_did_header)): if ( !file_exists( dirname(__FILE__) . '/wp-config.php') ) { if ( strstr( $_SERVER['PHP_SELF'], 'wp-admin') ) $path = ''; else $path = 'wp-admin/'; - die("There doesn't seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file."); + + require_once( dirname(__FILE__) . '/wp-includes/functions.php'); + wp_die("There doesn't seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.", "WordPress › Error"); } $wp_did_header = true;