Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing php.ini on Elastic Beanstalk

I am trying to configure my beanstalk application, setting the max_input_vars=5000 in php.ini.

I found this link which does pretty close to what I want except a little different. Instead of copying from S3 I just want to create a file with that line. The below is my code in a file named phpini.config found in the .elasticbeanstalk folder.

files:
    "/etc/php.d/project.ini" :
    mode: "000777"
    owner: root
    group: root
    content: |
      max_input_vars=5000

However, the value is not changing, as I seen when I run phpinfo(), nor is there a project.ini file created in /etc/php.d/.

Is there something I am missing out? Or is there a way I can see if this config file is being run?

Edit

Seems like the .config file is supposed to be in .ebextensions instead of .elasticbeanstalk according to AWS Docs. Making the change didnt make things work though.

like image 838
chongzixin Avatar asked Jun 09 '14 12:06

chongzixin


2 Answers

The cleanest way what we did to install a svn plugin that is to use a .ebextensions config file in my project archive:

Sample you can go like this create a file .ebextensions/eb.config file:

files:
  "/etc/php.d/project.ini" :
    mode: "000644"
    owner: root
    group: root
    content: |
      u max_input_vars=5000
like image 85
abaid778 Avatar answered Sep 28 '22 04:09

abaid778


I tried the abaid778 snippet code and does not work so I remove de 'u' before max_input_vars and that work now.

files:
  "/etc/php.d/project.ini" :
    mode: "000644"
    owner: root
    group: root
    content: |
      max_input_vars = 5000
like image 21
MaximeF Avatar answered Sep 28 '22 04:09

MaximeF