{"id":731,"date":"2017-10-12T17:54:33","date_gmt":"2017-10-12T15:54:33","guid":{"rendered":"https:\/\/quelijaume.net\/?p=731"},"modified":"2017-10-12T17:54:33","modified_gmt":"2017-10-12T15:54:33","slug":"resoldre-problema-php-cannot-modify-header-information","status":"publish","type":"post","link":"https:\/\/quelijaume.net\/?p=731","title":{"rendered":"Resoldre problema php &#8220;Cannot modify header information&#8221;"},"content":{"rendered":"<p>Ostres portava unes quantes setmanes batallant perqu\u00e8 no podia entrar al blog (aquest i un altre) per editar-lo o afegir entrades. Havia provat de tot i m&#8217;estava plantejant de reinstal\u00b7lar-lo del tot, o b\u00e9 d&#8217;esperar una actualitzaci\u00f3 que resolgu\u00e9s el problema.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium\" src=\"https:\/\/quelijaume.net\/fotoblog\/PHP-logo.png\" width=\"1200\" height=\"648\" \/><\/p>\n<p>El cas \u00e9s que hem sortia en intentar entrar l&#8217;av\u00eds &#8220;Cannot modify header information &#8211; headers already sent by&#8221;.<\/p>\n<p>Per internet es troben diverses causes, per\u00f2 a mi la soluci\u00f3 que m&#8217;ha funcionat \u00e9s la que he trobat en aquest blog <a href=\"https:\/\/cybmeta.com\/cannot-modify-header-information-headers-already-sent\">Cybmeta<\/a>, que a m\u00e9s d&#8217;una explicaci\u00f3 senzilla i netament clarificadora, ens deixa un arxiu php que ens resol ell solet el problema. B\u00e0sicament resulta que hi ha un espai en el codi d&#8217;algun arxiu php on no hi hauria de ser. I aix\u00f2 ens impedeix la execuci\u00f3 de la resta de codi del wordpress. Total, deixo enlla\u00e7 directe a l&#8217;arxiu que ho soluciona. Nom\u00e9s cal copiar-lo a l&#8217;arrel del blog, posar la nostra adre\u00e7a del blog i el nom de l&#8217;arxiu php (per a que s&#8217;executi) i voil\u00e0! M\u00e0gia. L&#8217;arxiu l&#8217;he copiat al meu servidor per si desapareix: <a href=\"https:\/\/quelijaume.net\/fotoblog\/remove_utf8_bom.zip\">Arxiu PHP<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ostres portava unes quantes setmanes batallant perqu\u00e8 no podia entrar al blog (aquest i un altre) per editar-lo o afegir entrades. Havia provat de tot i m&#8217;estava plantejant de reinstal\u00b7lar-lo del tot, o b\u00e9 d&#8217;esperar una actualitzaci\u00f3 que resolgu\u00e9s el problema. El cas \u00e9s que hem sortia en intentar entrar l&#8217;av\u00eds &#8220;Cannot modify header information &hellip; <a href=\"https:\/\/quelijaume.net\/?p=731\" class=\"more-link\">Continua la lectura de <span class=\"screen-reader-text\">Resoldre problema php &#8220;Cannot modify header information&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,187,5],"tags":[343,344,88],"class_list":["post-731","post","type-post","status-publish","format-standard","hentry","category-bravo","category-curiositats","category-divagacions-tecnologiques","tag-php","tag-problemes-resolts","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/quelijaume.net\/index.php?rest_route=\/wp\/v2\/posts\/731","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/quelijaume.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/quelijaume.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/quelijaume.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/quelijaume.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=731"}],"version-history":[{"count":1,"href":"https:\/\/quelijaume.net\/index.php?rest_route=\/wp\/v2\/posts\/731\/revisions"}],"predecessor-version":[{"id":732,"href":"https:\/\/quelijaume.net\/index.php?rest_route=\/wp\/v2\/posts\/731\/revisions\/732"}],"wp:attachment":[{"href":"https:\/\/quelijaume.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/quelijaume.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/quelijaume.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}