Cfileuploaded Returns Null If File Upload Is Big

I am building a multi file upload with gallery script and I noticed that when I upload a file around 30MB CFileUploaded returns null when I try to get the file. The code however works perfectly fine with smaller images. Anyone has any info or workaround for this?

extra: checking even further, if the filesize is actually above 2MB CFileUploaded will return null when I try to get the file.

FYI: nginx configuration is fine and the file upload is accepted.

First of all, you have two config params (php.ini):


; Maximum allowed size for uploaded files.

upload_max_filesize = ...


; Must be greater than or equal to upload_max_filesize

post_max_size = ...

Second, you can use file size validation

You were absolutely right!! Totally forgot to change the php configuration! Works like a charm! :D

NB: modifying ini settings is not a solution. It’s just a value for setting validator file size. The solution is using validation of input.