Saturday, 26 May 2018

Amazon EC2 Ubuntu Instance Maximum File Upload Size

I was given an Amazon EC2 Ubuntu Instance. We are task to create a web application that includes uploading a client video. I have created a file upload application in my localhost and it is working fine. When I migrated the code to the virtual host server, I cannot upload any video and even any file that exceeds 2Mb. I tried editing the php.ini setting upload_max_filesize to 50M and post_max_size to 1000M.

After restarting Apache so many times, the update is not reflected in my phpinfo() information but changes were saved in my php.ini file.

enter image description here enter image description here

I was suspecting that the Amazon EC2 instance given to me has a file upload restrictions but Im not sure if Im right. If I was wrong, how can I override the configuration below? Any help would be very much appreciated.

UPDATE:

I even made sure that I was editing the correct configuration file. Below are the screen shots:

enter image description here

enter image description here

UPDATE:

I tried following what is said in the link with no luck. I have a lot of questions in mind about the link like:

  1. What does tomcatchesides mean about S3 bucket? I uploaded the config file in /var/www/html/.ebextensions . Am I doing the right thing?

My zzz.ini contains the code below and I place it in /etc/php.d/zzz.ini:

[php]
post_max_size = 1000M
upload_max_filesize = 50M

My myconfigfile.config was located in /var/www/html/.ebextensions/myconfigfile.config and contains the code below:

files:
  "/etc/php.ini":
    mode: "000644"
    owner: root
    group: root
    source: http://mybucketname.s3.amazonaws.com/php.ini

  "/etc/php.d/zzz.ini":
    mode: "000644"
    owner: root
    group: root
    source: http://mybucketname.s3.amazonaws.com/zzz.ini

I also copied my php.ini from /etc/php/7.0/apache2/php.ini to /etc/php.ini and restarted apache. Still no changes. Am I doing the right thing?



from Amazon EC2 Ubuntu Instance Maximum File Upload Size

No comments:

Post a Comment