{"id":14035,"date":"2017-12-04T01:31:25","date_gmt":"2017-12-04T00:31:25","guid":{"rendered":"https:\/\/guy.pastre.org\/?p=14035"},"modified":"2017-12-04T01:31:25","modified_gmt":"2017-12-04T00:31:25","slug":"a-propos-du-fameux-warning-cannot-modify-header-information","status":"publish","type":"post","link":"https:\/\/guy.pastre.org\/?p=14035","title":{"rendered":"A propos du fameux \u00ab\u00a0Warning: Cannot modify header information&#8230;\u00a0\u00bb"},"content":{"rendered":"<p><a href=\"https:\/\/guy.pastre.org\/wp-content\/uploads\/2017\/12\/headerError.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-14039 \" src=\"https:\/\/guy.pastre.org\/wp-content\/uploads\/2017\/12\/headerError-453x255.jpg\" alt=\"\" width=\"334\" height=\"188\" srcset=\"https:\/\/guy.pastre.org\/wp-content\/uploads\/2017\/12\/headerError-453x255.jpg 453w, https:\/\/guy.pastre.org\/wp-content\/uploads\/2017\/12\/headerError-768x432.jpg 768w, https:\/\/guy.pastre.org\/wp-content\/uploads\/2017\/12\/headerError-604x340.jpg 604w, https:\/\/guy.pastre.org\/wp-content\/uploads\/2017\/12\/headerError.jpg 1280w\" sizes=\"auto, (max-width: 334px) 100vw, 334px\" \/><\/a>Les initi\u00c3\u00a9s auront reconnu ce message \u00ab\u00a0<em>Warning: Cannot modify header information \u00e2\u20ac\u201c headers already sent by (output started at&#8230;<\/em>\u00a0\u00bb qui surgit sans crier gare suite \u00c3\u00a0 une mise \u00c3\u00a0 jour ou autre changement de configuration.<\/p>\n<p>Me concernant les fa\u00c3\u00a7ons de le r\u00c3\u00a9soudre restent encore tout aussi obscures que les raisons de son apparition . <br \/>\n Mais j&rsquo;ai r\u00c3\u00a9cemment fait un petit pas en avant suite \u00c3\u00a0 la mise \u00c3\u00a0 jour probl\u00c3\u00a9matique d&rsquo;un multiblog WordPress vers la version 4.9.1.<\/p>\n<p>Mes recherches sur le net m&rsquo;ont amen\u00c3\u00a9 sur 2 fils de discussions des forums de <a href=\"http:\/\/www.commentcamarche.net\/forum\/affich-27185643-warning-cannot-modify-header-information-probleme-wp-config\">Comment \u00c3\u00a7a marche<\/a> et <a href=\"https:\/\/wpfr.net\/support\/sujet\/warning-cannot-modify-header-information-headers-already-sent-by-7\/\">wpfr.net<\/a> qui se recoupent une cause sa fa\u00c3\u00a7on de la r\u00c3\u00a9soudre.<\/p>\n<p>En r\u00c3\u00a9sum\u00c3\u00a9, c&rsquo;est l<strong>&lsquo;encodage du fichier wp-config.php qui peut \u00c3\u00aatre en cause s&rsquo;il n&rsquo;est pas fait en \u00ab\u00a0UTF8 sans BOM\u00a0\u00bb<\/strong>.\u00c2\u00a0<\/p>\n<p>Pour ce faire, il suffit d&rsquo;\u00c3\u00a9diter le pr\u00c3\u00a9sum\u00c3\u00a9 coupable avec Note++ (l&rsquo;outil pl\u00c3\u00a9biscit\u00c3\u00a9), d&rsquo;ouvrir le menu\u00c2\u00a0 \u00ab\u00a0Encodage\u00a0\u00bb de choisir le bon et d&rsquo;enregistrer le fichier avant de le renvoyer sur le serveur bien s\u00c3\u00bbr.<\/p>\n<p><a href=\"https:\/\/guy.pastre.org\/wp-content\/uploads\/2017\/12\/NoteplusBom.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-14036\" src=\"https:\/\/guy.pastre.org\/wp-content\/uploads\/2017\/12\/NoteplusBom-408x255.png\" alt=\"\" width=\"408\" height=\"255\" srcset=\"https:\/\/guy.pastre.org\/wp-content\/uploads\/2017\/12\/NoteplusBom-408x255.png 408w, https:\/\/guy.pastre.org\/wp-content\/uploads\/2017\/12\/NoteplusBom.png 505w\" sizes=\"auto, (max-width: 408px) 100vw, 408px\" \/><\/a><\/p>\n<p>Me concernant \u00c3\u00a7a a fonctionn\u00c3\u00a9, tout est rentr\u00c3\u00a9 dans l&rsquo;ordre&#8230;jusqu&rsquo;\u00c3\u00a0 la prochaine fois bien s\u00c3\u00bbr !<\/p>\n<p>Pour information :<em>\u00c2\u00a0\u00ab\u00a0l&rsquo;<b>indicateur d&rsquo;ordre des octets<\/b>\u00c2\u00a0<strong>ou BOM<\/strong> (pour l&rsquo;anglais\u00c2\u00a0<span class=\"lang-en\" lang=\"en\">byte order mark<\/span>) est une donn\u00c3\u00a9e qui indique l&rsquo;utilisation d&rsquo;un encodage unicode ainsi que l&rsquo;ordre des octets, g\u00c3\u00a9n\u00c3\u00a9ralement situ\u00c3\u00a9 au d\u00c3\u00a9but de certains fichiers texte<\/em>&#8230;\u00a0\u00bb <em>(<a href=\"https:\/\/fr.wikipedia.org\/wiki\/Indicateur_d%27ordre_des_octets\">Source : wikip\u00c3\u00a9dia)<\/a><\/em>\u00c2\u00a0 Dans certains cas c&rsquo;est cette donn\u00c3\u00a9e (invisible) qui pose probl\u00c3\u00a9me&#8230;\u00c2\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Les initi\u00c3\u00a9s auront reconnu ce message \u00ab\u00a0Warning: Cannot modify header information \u00e2\u20ac\u201c headers already sent by (output started at&#8230;\u00a0\u00bb qui surgit sans crier gare suite \u00c3\u00a0 une mise \u00c3\u00a0 jour ou autre changement de&#46;&#46;&#46;<\/p>\n","protected":false},"author":2,"featured_media":14039,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[74,56],"class_list":["post-14035","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-trucs-et-autres","tag-tutoriels","tag-wordpress"],"jetpack_featured_media_url":"https:\/\/guy.pastre.org\/wp-content\/uploads\/2017\/12\/headerError.jpg","_links":{"self":[{"href":"https:\/\/guy.pastre.org\/index.php?rest_route=\/wp\/v2\/posts\/14035","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/guy.pastre.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/guy.pastre.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/guy.pastre.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/guy.pastre.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14035"}],"version-history":[{"count":5,"href":"https:\/\/guy.pastre.org\/index.php?rest_route=\/wp\/v2\/posts\/14035\/revisions"}],"predecessor-version":[{"id":14042,"href":"https:\/\/guy.pastre.org\/index.php?rest_route=\/wp\/v2\/posts\/14035\/revisions\/14042"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/guy.pastre.org\/index.php?rest_route=\/wp\/v2\/media\/14039"}],"wp:attachment":[{"href":"https:\/\/guy.pastre.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14035"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/guy.pastre.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14035"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/guy.pastre.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}