Diasline
Diasline

Reputation: 635

Upload large file to s3 with php

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. ?

Upvotes: 1

Views: 1834

Answers (2)

Simon MC. Cheng
Simon MC. Cheng

Reputation: 291

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

Upvotes: 1

Emilio Gort
Emilio Gort

Reputation: 3470

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

Upvotes: 0

Related Questions