2012-02-06 13 views

Respuesta

3

Ver 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.

Abrir el archivo con un editor de texto (como el Bloc de notas o BBEdit) y limpiar el espacio en blanco. Compruebe que los primeros caracteres sean <?php y que los últimos caracteres NO sean una etiqueta de cierre de PHP, o una etiqueta de cierre ?> sin líneas en blanco o espacios después de ella. (Para su información, un archivo PHP puede funcionar bien sin la ?> etiqueta de cierre.)

Al guardar, asegúrese de que la codificación de archivos no es BOM UTF-8, pero sin formato UTF-8 o cualquier sin el sufijo lista de materiales.

Y:

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. En mi caso, era una línea en blanco de apertura antes de '' ' yuvilio

+0

Para mí, el error decía que estaba en index.php de mi tema personalizado. La nueva línea que causa el problema se ubicó antes de la etiqueta php en el archivo root wordpress index.php. – Kyle

19

añadir este código en wp-config.php en la primera línea:

ob_start(); 
error_reporting(0); 
+0

Gracias, intentaré esto. Disculpa por el retraso en responder. – user1192684

+0

¡Funciona! Gracias. –

+0

¡Funciona, gracias! –

0

remueva el exceso de /home/ya3mblog/public_html/wp-login.php blankspace en la línea 59

Cuestiones relacionadas