1

How can i change the default value 2MB of upload_max_filesize to 6MB in amazon aws where application is hosted so that i can upload larger file than the default value in S3 bucket. ?

Diasline
  • 625
  • 3
  • 32
  • There is no Default value for S3 you can upload a single file of 5Gb to S3. To increase the upload limit you have to do that in PHP.INI file by changing the value for upload_max_filesize – Piyush Patil Jul 27 '16 at 18:57
  • My problem is how to change this value in php.ini, i can do it in local server, but my application is hosted in amazon aws, i can read the php setting in aws but i don't know how to change upload_max_filesize in aws server ? – Diasline Jul 27 '16 at 19:01
  • R u using Ubuntu or AWS Linux? – Piyush Patil Jul 27 '16 at 19:02
  • 64bit Amazon Linux 2014.09 – Diasline Jul 27 '16 at 19:06
  • Ok check if you have a php.ini file at this path /etc/php.ini – Piyush Patil Jul 27 '16 at 19:14
  • `upload_max_size` in php applies only to files/data being sent TO php. it has no effect whatsoever on stuff that php's sending OUT. – Marc B Jul 27 '16 at 19:31

2 Answers2

1

First, you need to have terminal access to your EC2 with either one of the method listed in AWS manual: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstances.html

Then, browse to the file location which your phpinfo() shows, for example: /etc/php.ini, edit the file with:

vi /etc/php.ini

Search for the text: upload_max_filesize and post_max_size, follow the instruction as listed in PHP change the maximum upload file size

Community
  • 1
  • 1
Simon MC. Cheng
  • 291
  • 1
  • 6
0

Make a page with the following php code

phpinfo();

enter image description here

There you are going to see the location for the php.ini

and set the value upload_max_filesize to wahtever you want

Emilio Gort
  • 3,475
  • 3
  • 29
  • 44