Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Elastic BeanStalk php.ini file update

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
like image 304
Drizzle53 Avatar asked Jul 26 '16 19:07

Drizzle53


1 Answers

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
like image 127
infohound Avatar answered Nov 06 '22 04:11

infohound