Friday, November 28, 2014

How change PHP maximum file upload size


In PHP web application we can upload file or image and work with file or image.
Initially PHP allow 2Mb file size to upload. If we upload big file then 2Mb it failed to upload. So we need to update PHP maximum file size to upload big file or image.

To update the maximum size of file upload-
You need to set the value of upload_max_filesize and post_max_size in your php.ini :

Initially this value:

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize=2M
; Maximum number of files that can be uploaded via a single request
max_file_uploads=2M

We can update this value as below-

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize=40M
; Maximum number of files that can be uploaded via a single request
max_file_uploads=40M 

and then save and close the php.ini file.

After saving you need to restart your apache server. Now you can try to upload up to 40 Mb file or image and will not fail to upload.

4 comments :

  1. Great php tutorials tips for programming. It can help better for php developers.Thanks for this useful post.

    ReplyDelete
  2. Hey, Thanks for this post....! Great concepts. I want to know more about web applications development, so please share more post with me. SEO Company

    ReplyDelete
  3. Very Nice Collection of informative information!! I am regular blog reader and today find your blog. I have found deep knowledge about latest tools. Very Nice Collection of informative information!! I am regular blog reader and today find your blog. I have found deep knowledge about latest tools. Thanks for sharing.. straight bevel gears

    ReplyDelete

 

Copyright @ 2014 Tech Tutorial .