0
votes

The problem is from word-press admin panel, I can upload up to 100mb file. without any problem. But when i am uploading it via simple script in plugin. Even 1 mb file its showing 413 "

Request Entity Too Large

I know this is server side error, But my question is How word-press can able to upload large file via ajax and my script don't? I am using this plugin for upload http://codecanyon.net/item/html5-file-upload/full_screen_preview/9254506 I have tried every thing like In PHP Code ini_set('max_execution_time', "3600"); ini_set('memory_limit', "99M"); ini_set('post_max_size', '3000M'); ini_set('upload_max_filesize','3000M'); ini_set('max_input_time','3600'); ini_set('client_max_body_size','200M');

In .htaccess file

LimitRequestBody 1024000

But i am not able to figure out why?

1

1 Answers

0
votes

You're going to want to amend your servers php.ini file.

The code you put in your answer included part of the answer which was messing up which is the memory_limit.

Try this:

memory_limit = 256M
upload_max_filesize = 256M
post_max_size = 256M
max_execution_time = 3000

This allows for files up to 256Mb and will allow for up to 5 minutes of execution which can cause problems if you have a slow internet speed.

Amend it to whatever you think the absolute maximum file size will be.