9
votes

I would like to increase my minimum upload filesize from 2MB to 64 MB for my php web application.. I have a config file stored in an .ebextensions directory.. While deploying to aws, an error occurred:

The configuration file .ebextensions/yep.config in application version try10 contains invalid YAML or JSON. YAML exception: while scanning a simple key in "", line 7, column 7: upload_max_filesize = 64M ^ could not found expected ':' in "", line 8, column 7: post_max_size = 64M ^ , JSON exception: Unexpected character (f) at position 0.. Update the configuration file.

Below is my config file that I am starting out with. I have spend 8 hours troubleshooting with no luck. Any help will be very much obliged.

files:
"/etc/php.ini":
  mode: "000755"
  owner: root
  group: root
  content: |
  upload_max_filesize = 64M
  post_max_size = 64M
1
Your php.ini path is the issue I guess the path for php.ini is "/etc/php5/apache2/php.ini" most of the times. Ans after you update you will have to restart apache too. - error2007s
Ok I will try that.. - Drizzle53
yeah its still giving me the same error.. so something is wrong with the code - Drizzle53
Do you have apache on you server? - error2007s
yes its apache 2.0 handler - Drizzle53

1 Answers

15
votes

I am using this successfully in an Elastic Beanstalk application. Just put the following into your yep.config file inside of your .ebextensions directory in the root of your application.

files:
  "/etc/php.d/project.ini" :
    mode: "000644"
    owner: root
    group: root
    content: |
      upload_max_filesize=64M
      post_max_size=64M