{"id":2711,"date":"2014-03-31T16:52:41","date_gmt":"2014-03-31T16:52:41","guid":{"rendered":"http:\/\/www.deuzebranaweb.com.br\/?p=2711"},"modified":"2014-03-31T16:52:41","modified_gmt":"2014-03-31T16:52:41","slug":"resolve-php-fatal-error-allowed-memory","status":"publish","type":"post","link":"https:\/\/blog.deuzebranaweb.com.br\/resolve-php-fatal-error-allowed-memory\/","title":{"rendered":"Resolve PHP Fatal Error: Allowed memory"},"content":{"rendered":"<p><strong>Resolve PHP Fatal Error: Allowed memory\u00a0<\/strong><\/p>\n<div>\n<h1>Solve PHP Fatal Error: Allowed memory size of 8388608 bytes exhausted (tried\u2026<\/h1>\n<div>\n<p>Posted by\u00a0<a href=\"http:\/\/www.tech-recipes.com\/rx\/author\/Rex\/\">Rex<\/a><a>\u00a0in\u00a0<\/a><a title=\"View all posts in PHP programming\" href=\"http:\/\/www.tech-recipes.com\/rx\/category\/computer-programming\/web-application-programming\/php-programming\/\" rel=\"category tag\">PHP programming<\/a><\/p>\n<\/div>\n<div id=\"nrelate_flyout_placeholder\">\n<p>This error message can spring up in a previously functional PHP script when the memory requirements exceed the default 8 MB limit. However, do not fret because this is an easy problem to overcome.<br \/>\nTo change the memory limit for one specific script, include a line such as this at the top of the script:<\/p>\n<p><code>ini_set(\"memory_limit\",\"12M\");<\/code><\/p>\n<p>The 12M sets the limit to 12 megabytes (12582912 bytes). If this does not work, keep increasing the memory limit until your script fits or your server squeals for mercy.<\/p>\n<p>You can also make this a permanent change for all PHP scripts running on the server by adding a line such as this to the server\u2019s php.ini file:<\/p>\n<p><code>memory_limit = 12M<\/code><\/p>\n<p>Keep in mind that a huge memory limit is a poor substitute for good coding. A poorly written script may inefficiently squander memory which can cause severe problems for frequently executed scripts. However, some applications are run infrequently and require lots of memory like importing and processing a large data file.<\/p>\n<div>memory_limit = 128M; Maximum amount of memory a script may consume (64MB)<br \/>\nmax_execution_time = 45;<br \/>\nupload_max_filesize = 10M;<br \/>\npost_max_size = 20M; &#8220;<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>http:\/\/www.tech-recipes.com\/rx\/777\/solve-php-fatal-error-allowed-memory-size-of-8388608-bytes-exhausted-tried\/<\/p>\n<p>http:\/\/wordpress.org\/support\/topic\/fatal-error-out-of-memory-allocated-30408704<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Resolve PHP Fatal Error: Allowed memory\u00a0 Solve PHP Fatal Error: Allowed memory size of 8388608 bytes exhausted (tried\u2026 Posted by\u00a0Rex\u00a0in\u00a0PHP programming This error message can spring up in a previously functional PHP script when the memory requirements exceed the default 8 MB limit. However, do&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_angie_page":false,"page_builder":"","footnotes":""},"categories":[6],"tags":[],"class_list":["post-2711","post","type-post","status-publish","format-standard","hentry","category-php"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/wp-json\/wp\/v2\/posts\/2711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/wp-json\/wp\/v2\/comments?post=2711"}],"version-history":[{"count":0,"href":"https:\/\/blog.deuzebranaweb.com.br\/wp-json\/wp\/v2\/posts\/2711\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/wp-json\/wp\/v2\/media?parent=2711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/wp-json\/wp\/v2\/categories?post=2711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/wp-json\/wp\/v2\/tags?post=2711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}