2012-02-06 2 views
5

エラーにより送信されたヘッダ:それは適切な方法を使用してユーザ登録を防ぐことだエラー - 警告:ヘッダー情報を変更することはできません - すでに

Warning: Cannot modify header information - headers already sent by (output started at /home/ya3mblog/public_html/wp-login.php:59) in /home/ya3mblog/public_html/wp-includes/pluggable.php on line 866

website: ipublisharticles.com Error is at: ipublisharticles.com/wp-login.php?action=register

答えて

3

How_do_I_solve_the_Headers_already_sent_warning_problem? > FAQ Troubleshooting « WordPress Codex

(This error) is usually because there are spaces, new lines, or other stuff before an opening <?php tag or after a closing ?> tag, typically in wp-config.php.

オープン(メモ帳またはBBEditのような)テキストエディタでファイルを参照し、ホワイトスペースをクリア。最初の文字が であり、最後の文字がPHP終了タグでないか、または終了タグ?>の後ろに空白行または空白がないことを確認してください。

保存するときは、ファイルのエンコーディングがUTF-8 BOMではなく、プレーンUTF-8かBOMサフィックスのないものであることを確認してください(このPHPファイルは正常終了しません)。

そして:

This could be true about some other file too, so please check the error message, as it will list the specific file name where the error occurred. Replacing the faulty file with one from your most recent backup or one from a fresh WordPress download is your best bet.

If the error message states: Warning: Cannot modify header information - headers already sent by (output started at /path/blog/wp-config.php:34) in /path/blog/wp-login.php on line 42 , then the problem is at line #34 of wp-config.php, not line #42 of wp-login.php. In this scenario, line #42 of wp-login.php is the victim. It is being affected by the excess whitespace at line #34 of wp-config.php.

If the error message states: Warning: Cannot modify header information - headers already sent by (output started at /path/wp-admin/admin-header.php:8) in /path/wp-admin/post.php on line 569 , then the problem is at line #8 of admin-header.php, not line #569 of post.php. In this scenario, line #569 of post.php is the victim. It is being affected by the excess whitespace at line #8 of admin-header.php.

+0

Spot on。私の場合、 '' 'wp-config.php'''ファイルの' '' <?php''の前に空白行を挿入していました。 – yuvilio

+0

私にとっては、エラーは私のカスタムテーマのindex.phpにあると言いました。問題の原因となった改行は、rootのwordpress index.phpファイルのphpタグの前にあります。 – Kyle

19

最初の行にwp-config.phpにこのコードを追加します。

ob_start(); 
error_reporting(0); 
+0

ありがとう、私はこれを試してみます。返信が遅れて申し訳ありません。 – user1192684

+0

それは動作します!ありがとう。 –

+0

これは動作します、ありがとう! –

0

は、ライン59における過剰blankspaceの/home/ya3mblog/public_html/wp-login.phpを削除

関連する問題