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: alexandrleonenko, Milton

administrator
Site Admin
Site Admin
Posts: 6003
Joined: Jan 7th, '09, 23:18
Contact:

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:

php.ini
Edit php.ini and modify these directives:

Code: Select all

upload_max_filesize = 128M
post_max_size = 256M


.htaccess
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”