管理パネルにログインしようとすると、このエラーが発生します。私はそれを理解することができません。
Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/wordpress/wp-config.php:1) in /home/xxxxxx/public_html/wordpress/wp-includes/pluggable.php on line 881
pluggable.php 881:
function wp_redirect($location, $status = 302) {
global $is_IIS;
$location = apply_filters('wp_redirect', $location, $status);
$status = apply_filters('wp_redirect_status', $status, $location);
if ( !$location ) // allows the wp_redirect filter to cancel a redirect
return false;
$location = wp_sanitize_redirect($location);
if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' )
status_header($status); // This causes problems on IIS and some FastCGI setups
header("Location: $location", true, $status);
}
endif;
最新バージョンのワードプレス 3.4.2 を使用しています。私のサイトは正常に動作しているようですが、エラーによりログイン ページにアクセスできません。つまり、この問題を引き起こしたと思われるプラグイン (dbc バックアップ 2) をまったく管理したり、アンインストールしたりできません。HTML キット ツールを使用して wp.config ファイルを何百回もチェックしましたが、ファイルの先頭にも末尾にも空白が表示されていません。私は持っている:
- HTML-Kit ツールを使用して wp-config ファイルの空白をチェックしました
- 新しい新鮮なwp-configファイルをダウンロードして挿入しました
- 名前を変更してプラグインディレクトリを無効にしました
...そしてエラーはまだ残っています
私が試してみなければならない唯一のことは、次のコードを wp-config.php ファイルに挿入することでこの問題を解決したと誰かがワードプレス フォーラムに投稿したこのコードです。
<?
//dont use header function in wordpress-wp_signup.php
global $domain;
global $path;
//change urlnew variable as per requirment
$urlnew = "http://".$domain.$path."/wp-admin/admin.php;
echo "<script>";
echo "location = '$urlnew';";
echo "</script>";
echo $urlnew;
?>
html や php に詳しくなく、このコードがどのように機能するかを正確に理解していないため、コードを追加することに消極的です。より良い提案はありますか?
テーマの function.php ファイルは次のように終了します。コードを正確にどこに挿入すればよいですか?:
// include custom widget
$temp_root = get_root_directory('include/plugin/custom-widget/custom-blog-widget.php');
include_once($temp_root . 'include/plugin/custom-widget/custom-blog-widget.php');
$temp_root = get_root_directory('include/plugin/custom-widget/custom-port-widget.php');
include_once($temp_root . 'include/plugin/custom-widget/custom-port-widget.php');
$temp_root = get_root_directory('include/plugin/custom-widget/custom-port-widget-2.php');
include_once($temp_root . 'include/plugin/custom-widget/custom-port-widget-2.php');
$temp_root = get_root_directory('include/plugin/custom-widget/popular-post-widget.php');
include_once($temp_root . 'include/plugin/custom-widget/popular-post-widget.php');
$temp_root = get_root_directory('include/plugin/custom-widget/contact-widget.php');
include_once($temp_root . 'include/plugin/custom-widget/contact-widget.php');
$temp_root = get_root_directory('include/plugin/custom-widget/flickr-widget.php');
include_once($temp_root . 'include/plugin/custom-widget/flickr-widget.php');
$temp_root = get_root_directory('include/plugin/custom-widget/twitter-widget.php');
include_once($temp_root . 'include/plugin/custom-widget/twitter-widget.php');
// get the path for the file ( to support child theme )
function get_root_directory( $path ){
if( file_exists( STYLESHEETPATH . '/' . $path ) ){
return STYLESHEETPATH . '/';
}else{
return TEMPLATEPATH . '/';
}
}
?>