{"id":4217,"date":"2016-08-29T12:17:54","date_gmt":"2016-08-29T12:17:54","guid":{"rendered":"http:\/\/www.deuzebranaweb.com.br\/?p=4217"},"modified":"2016-08-29T12:17:54","modified_gmt":"2016-08-29T12:17:54","slug":"allowed-memory-size-of-268435456-bytes-exhausted-erro-de-limite-de-memoria-php-memory-limit","status":"publish","type":"post","link":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/2016\/08\/29\/allowed-memory-size-of-268435456-bytes-exhausted-erro-de-limite-de-memoria-php-memory-limit\/","title":{"rendered":"Allowed memory size of 268435456 bytes exhausted Erro de limite de mem\u00f3ria (PHP memory limit)"},"content":{"rendered":"<p class=\"articlesubject\">Erro de limite de mem\u00f3ria (PHP memory limit)<\/p>\n<h2 class=\"subject2a\">Erro: &#8220;Allowed Memory Size Exhausted&#8221;<\/h2>\n<blockquote class=\"blockquotewarning\"><p>Fatal error: Allowed memory size of 12582912 bytes exhausted (tried to allocate 23456789 bytes) in algumarquivo.php<\/p><\/blockquote>\n<blockquote class=\"blockquotewarning\"><p>Fatal Error: PHP Allowed Memory Size Exhausted<\/p><\/blockquote>\n<div id=\"code\">Esses erros ocorrem quando o PHP tenta processar um registro grande no banco de dados, importar ou exportar um banco de dados e at\u00e9 mesmo ao fazer upload de arquivos pelo site.<\/div>\n<p>Para corrigir o problema, por favor modifique a linha <strong>memory_limit<\/strong> no arquivo php.ini, para que fique de acordo com este exemplo:<\/p>\n<div class=\"code\">memory_limit = 256M<\/div>\n<p>Por padr\u00e3o, a HostGator limita o uso m\u00e1ximo de mem\u00f3ria a 256 MB (268.435.456 bytes). <strong>Se voc\u00ea quiser definir um valor maior, vai precisar de um plano de VPS ou servidor dedicado<\/strong>.<\/p>\n<p>Ent\u00e3o, se voc\u00ea receber este erro: &#8220;Allowed memory size of 268435456 bytes exhausted&#8230;&#8221;, como n\u00e3o poder\u00e1 colocar um limite maior, ser\u00e1 necess\u00e1rio um VPS ou Servidor Dedicado.<\/p>\n<hr \/>\n<h2 class=\"subject2a\">Erro: &#8220;Out of Memory&#8221;<\/h2>\n<blockquote class=\"blockquotewarning\"><p>Fatal error: Out of memory (allocated 168435456) (tried to allocate 47 bytes) in algumarquivo.php<\/p><\/blockquote>\n<p>Se menos de 168435456 bytes est\u00e3o sendo alocados, mas voc\u00ea ainda v\u00ea um erro como o do exemplo acima, ent\u00e3o sugerimos que contate o nosso suporte para que possamos ajud\u00e1-lo.<\/p>\n<p>Tente deixar assim no php.ini assim:<br \/>\nmax_execution_time = 3600<br \/>\nmax_input_time= 3600<br \/>\nmax_input_vars = 6000<br \/>\nmemory_limit= 512M<br \/>\npost_max_size = 512M<br \/>\nupload_max_filesize = 512M<br \/>\nmax_file_uploads = 50<\/p>\n<p>Se continuar coloque o memory_limit=1024M<\/p>\n<p>&nbsp;<\/p>\n<p>outra forma\u00a0com a fun\u00e7\u00e3o apresentada.<\/p>\n<p>ini_set(&#8216;memory_limit&#8217;, &#8216;1024M&#8217;)<br \/>\nNeste caso voc\u00ea n\u00e3o dependo do servi\u00e7o da locaweb, hostgator, hostuniveso ou qualquer hospedagem.<\/p>\n<p>&nbsp;<\/p>\n<p>http:\/\/faq.hostgator.com.br\/content\/70\/296\/pt-br\/erro-de-limite-de-mem%C3%B3ria-php-memory-limit.html<\/p>\n<p>http:\/\/www.scriptcase.com.br\/forum\/index.php?topic=10441.0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Erro de limite de mem\u00f3ria (PHP memory limit) Erro: &#8220;Allowed Memory Size Exhausted&#8221; Fatal error: Allowed memory size of 12582912 bytes exhausted (tried to allocate 23456789 bytes) in algumarquivo.php Fatal Error: PHP Allowed Memory Size Exhausted Esses erros ocorrem quando o PHP tenta processar um&#8230;<\/p>\n","protected":false},"author":2,"featured_media":4221,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_angie_page":false,"page_builder":"","footnotes":""},"categories":[6,7],"tags":[],"class_list":["post-4217","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","category-wordpress"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/posts\/4217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=4217"}],"version-history":[{"count":0,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/posts\/4217\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/media\/4221"}],"wp:attachment":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=4217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=4217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=4217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}