Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

POST Content-Length exceeds the limit

Tags:

php

I get similar errors in my error_log in php when users are uploading their files

PHP Warning: POST Content-Length of 11933650 bytes exceeds the limit of 8388608 bytes in Unknown on line 0

In my php.ini (created custom ini file in public_html) would this solve this problem, how much would I have to set it to around 1GB? I am going to change my settings to this in php.ini, will it solve the problem?

upload_max_filesize = 1000M ;1GB post_max_size = 1000M 

What would I set the 'memory_limit' limit to.

Also would this be correct in my script to check file uploaded size is <1GB

if($_FILES["uploadedfile"]["size"]<1000000) 
like image 958
daza166 Avatar asked Jun 08 '11 13:06

daza166


People also ask

How do I increase post length in Wordpress?

Click on the here link in order to access the PHP Settings editor. Once you are inside the editor, locate the variables post_max_size and upload_max_filesize. Set the upload limit to a value greater than the size of your theme file and press Save.


1 Answers

8388608 bytes is 8M, the default limit in PHP. Those changes to php.ini should indeed solve the problem (make sure your restart your Apache server after making them).

Memory limit shouldn't need to be changed here.

like image 57
ceejayoz Avatar answered Oct 01 '22 18:10

ceejayoz