Feb.02

Maxmium upload file size setting on Apache Php

The default size of upload file on Apache setting is 2mb. We need to change the setting of maximum upload file size when we wants to upload grater than 2MB file size.

The default setting of the Uploaded File Size  is located on php.ini file which is located on your installed directory of XAMPP or WAMP server.

 

Note:   When we change the maximum file upload file size (upload_max_filesize) we also need to increase the maximum size of post data (post_max_size).

For example if we can set maximum file size to 100M and we are going to upload 100 mb file but the post size is 8m by default; in that case it gets error when uploading so we need to change both the file size and post size with increment with ratio. Below is the php.ini file location and the setting of size with line number.

 

XAMPP Server:

The maximum file size is setting on XAMPP server line 513 or find upload_max_filesize. which is default set as 2M you can change as you required ie. 8M,20M,100M…

Location : <xampp_install_dirtectory>/xampp/php/php.ini

line :: 513 ::

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

line :: 409::

; Maximum size of POST data that PHP will accept.
post_max_size = 8M

 

WAMP Server:

The maximum file size is setting on WAMP server line 513 or find upload_max_filesize. which is default set as 2M you can change as you required ie. 8M,20M,100M…

Location : <wamp_install_dirtectory>/wamp/bin/php/php<with_version>/php.ini

line :: 884 ::

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2M

line :: 734 ::

; Maximum size of POST data that PHP will accept.
; http://php.net/post-max-size
post_max_size = 8M

 

 

Share this Story:
  • facebook
  • twitter
  • gplus

Leave a comment

Facebook Comment