Tutorial :24MB PHP file upload fails silently


I'm writing an app that accepts .mp4 uploads.

So I've a 24.3MB .mp4 that is posted to the server, but it fails silently.

The next smallest file I have is a 5.2MB .flv. It's not the file type of course, but file size.

I wonder if anybody could shed some light on this?

P.S. the relevant php.ini entries are as follows:

memory_limit = 256M  upload_max_filesize = 32M  



You should also set post_max_size. Files are sent using HTTP POST.


I wonder if it's encoding-related. Base64 encoding = 33% greater size. 24.3 * 1.33 = 32.4 MB > 32 MB. Try a 23.9 MB file and see if that succeeds


post_max_size is a good idea, also you should check for timeouts. Since uploading larger files takes longer, the webserver might decide it's all taking too long and cancel the request. Check for maximum execution time in php.ini, also check whether there are other server-side time limits (I know of webervers where all tasks are killed after 30 secs. no matter what. An upload might easily take longer than that).

Have you considered using a Flash-Based uploader? This gives you more control over the upload process, and you can display a progress bar during upload (more user-friendly)


Set error reporting level to E_ALL. Might give you some hint about what's going wrong.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »