{"id":321,"date":"2009-11-13T11:32:11","date_gmt":"2009-11-13T15:32:11","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=321"},"modified":"2013-03-20T08:41:10","modified_gmt":"2013-03-20T12:41:10","slug":"php-warning-post-content-length-exceeds-the-limit","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/php-warning-post-content-length-exceeds-the-limit","title":{"rendered":"PHP Warning: POST Content-Length exceeds the limit"},"content":{"rendered":"<blockquote><p><span style=\"color: #0000ff;\"><strong>PHP Warning: POST Content-Length of xxxxx bytes exceeds the limit of xxxxxx bytes in Unknown on line 0<\/strong><\/span><\/p><\/blockquote>\n<p>You receive the &#8220;POST Content-Length&#8221; error message when a file greater than the size defined in the php.ini file is uploaded via the browser.<\/p>\n<p>The file you are uploading using the POST method should not exceed the value of post_max_size defined in php.ini file. If it does, it results in the above error message.<\/p>\n<p><span style=\"color: #0000ff;\"><strong>Solution:<\/strong><\/span><br \/>\nIn case you are looking to upload a larger file size, you need to increase the value of &#8220;post_max_size&#8221; in php.ini.<\/p>\n<p><strong>1)<\/strong> To locate the exact php.ini file, your PHP is using<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>php -i | grep php.ini<\/strong><\/span><\/p><\/blockquote>\n<p><strong>2)<\/strong> Edit the php configuration file<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>pico \/usr\/local\/lib\/php.ini<\/strong><\/span><\/p><\/blockquote>\n<p><strong>3)<\/strong> If you are looking to upload a file of 30M, set post_max_size and to upload_max_filesize to 40M.<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>post_max_size = 40M<br \/>\nupload_max_filesize = 40M <\/strong><\/span><\/p><\/blockquote>\n<p><strong>4)<\/strong> Save the file and restart the httpd service<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>service httpd restart<\/strong><\/span><\/p><\/blockquote>\n<p>You should be done now.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP Warning: POST Content-Length of xxxxx bytes exceeds the limit of xxxxxx bytes in Unknown on line 0<br \/>\nYou receive the &#8220;POST Content-Length&#8221; error message when a file greater than the size defined in the php.ini file is uploaded via the browser.<br \/>\nThe file you are uploading using the POST method should not exceed the value of post_max_size defined in php.ini file. If it does, it results in the above error message.<br \/>\nSolution:<br \/>\nIn case you are looking to upload a larger file size, you need to increase the value of &#8220;post_max_size&#8221; [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[958,963,959,962,960,390,396,961],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/321"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=321"}],"version-history":[{"count":6,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/321\/revisions"}],"predecessor-version":[{"id":2140,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/321\/revisions\/2140"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}