{"id":836,"date":"2022-08-18T15:18:09","date_gmt":"2022-08-18T15:18:09","guid":{"rendered":"https:\/\/blog.hostinger.io\/es\/support\/2022\/08\/18\/1583195-como-reparar-el-error-fatal-de-php-no-se-puede-volver-a-declarar-en-hostinger\/"},"modified":"2022-08-18T15:18:09","modified_gmt":"2022-08-18T15:18:09","slug":"1583195-como-reparar-el-error-fatal-de-php-no-se-puede-volver-a-declarar-en-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/es\/support\/1583195-como-reparar-el-error-fatal-de-php-no-se-puede-volver-a-declarar-en-hostinger\/","title":{"rendered":"C\u00f3mo Reparar el Error Fatal de PHP: \u00bfNo Se Puede Volver a Declarar en Hostinger?"},"content":{"rendered":"<p class=\"no-margin\">En caso de que alguna vez encuentres este error exacto o similar &laquo;Error fatal de PHP: no se puede volver a declarar la funci&oacute;n&raquo;, significa que tu secuencia de comandos est&aacute; tratando de declarar la misma funci&oacute;n varias veces.<\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">Esto significa una de las siguientes cosas:<\/p><p class=\"no-margin\">\n<\/p><ul>\n<li>\n<p class=\"no-margin\">La funci&oacute;n se define en dos archivos separados.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">La funci&oacute;n se define en dos lugares en el mismo archivo.<\/p>\n<\/li>\n<\/ul><p class=\"no-margin\">Para estos dos casos, verifica el mensaje de error completo: te dir&aacute; en qu&eacute; archivo se declar&oacute; previamente esta funci&oacute;n.<\/p><ul>\n<li>\n<p class=\"no-margin\">El archivo en el que defini&oacute; tu funci&oacute;n se incluye dos veces.<\/p>\n<\/li>\n<\/ul><p class=\"no-margin\">Este punto se puede solucionar f&aacute;cilmente usando <b><a href=\"http:\/\/www.php.net\/manual\/en\/function.include-once.php\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">include once<\/a><\/b> en lugar de <b><a href=\"http:\/\/www.php.net\/manual\/en\/function.include.php\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">include<\/a><\/b><i> <\/i>al incluir tu archivo PHP.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Solucionar el \u00abError fatal: no se puede volver a declarar\u00bb.<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[206],"tags":[],"class_list":["post-836","post","type-post","status-publish","format-standard","hentry","category-desarrollo-de-sitio-web"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/1583195-how-to-fix-the-php-cannot-redeclare-error-at-hostinger\/","default":1},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/support\/1583195-como-reparar-el-error-fatal-de-php-no-se-puede-volver-a-declarar-en-hostinger\/","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/support\/1583195-comment-reparer-php-fatal-error-cannot-redeclare-chez-hostinger\/","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/support\/1583195-bagaimana-cara-memperbaiki-error-php-fatal-error-cannot-redeclare-di-hostinger\/","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/br\/support\/1583195-como-corrigir-o-erro-fatal-error-cannot-redeclare-function-no-hostinger\/","default":0},{"locale":"uk-UA","link":"https:\/\/www.hostinger.com\/ua\/support\/1583195----php-cannot-redeclare-hostinger\/","default":0}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/posts\/836","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/comments?post=836"}],"version-history":[{"count":0,"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/posts\/836\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/media?parent=836"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/categories?post=836"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/tags?post=836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}