HOW TO increase maximum filesize?

Discuss everything related to File Uploader. All versions. Any questions related to the File Uploader developing or using should be posted to this forum.

Moderators: ne_moj, zewa, Milton, vadimako, ne_moj, zewa, Milton, vadimako

Site Admin
Site Admin
Posts: 5959
Joined: Jan 7th, '09, 23:18

HOW TO increase maximum filesize?

Postby administrator » Oct 17th, '11, 13:14

To increase the maximum filesize you need to set 2 directives:

  • upload_max_filesize - Maximum allowed size for uploaded files.
  • post_max_size - Maximum size of POST data that PHP will accept.

Generally you should set post_max_size to double what you set upload_max_filesize to. This means you can upload 2 files of your maximum limit for each POST and seems like a good middle ground.

The memory_limit directive should also be set above the value of post_max_size so your server can handle the uploads.

There are 2 ways you can set this directive:

Edit php.ini and modify these directives:

Code: Select all

upload_max_filesize = 128M
post_max_size = 256M

Edit .htaccess and add:

Code: Select all

php_value upload_max_filesize 128M
php_value post_max_size 256M

Adjust 128M and 256M with the sizes you require.

Return to “ApPHP AJAX File Uploader”