Upload limit error when uploading file from a website form

nitdna

Member
Nov 13, 2013
17
0
1
cPanel Access Level
Root Administrator
Hello

Having this annoying issue of a file size limit being set (presumably in PHP) to 8MB (but expressed in bytes: 8388608).
When submitting a file upload from a form on a website the following error is logged:
[04-Mar-2014 17:00:01 Australia/Melbourne] PHP Warning: POST Content-Length of 11698092 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
Set in the php.ini file for the website is the following:
upload_max_filesize = 50M
post_max_size = 200M

When this was set and the error still occurred started to look at other settings and so have made temp changes to PHP settings for the server under PHP configuration in WHM as well as in the Tweak settings for PHP in WHM.

Yet every time a file is uploaded the error is logged.

Where else could this limit be set?
 

nitdna

Member
Nov 13, 2013
17
0
1
cPanel Access Level
Root Administrator
Wow! found it!
php.ini file that had this line in it: post_max_size = 8M
file was located in /usr/lib (Go figure!).
Once this was changed all good.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello :)

I am happy to see the issue is now resolved. Note that the php.ini file in /usr/lib is actually a link to /usr/local/lib/php.ini.

Thank you.