Change php.ini on an elastic beanstalk

I am trying to configure a beanstalk application by setting max_input_vars=5000 in php.ini .

I found this link , which is very close to what I want, but a little different. Instead of copying from S3, I just want to create a file with this line. Below is my code in a file called phpini.config , which is located in the .elasticbeanstalk folder.

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

However, the value does not change, as I saw when running phpinfo() , and there is no project.ini file created in /etc/php.d/ .

Am I missing something? Or is there a way I can see if this configuration file is running?

Edit

It seems that the .config file should be in .ebextensions instead of .elasticbeanstalk according to AWS Docs . However, the changes did not affect the work.

+6
source share
2 answers

The cleanest way to create an svn plugin that should use the .ebextensions configuration file in my project archive:

A sample you can do is create the .ebextensions file / eb.config file:

 files: "/etc/php.d/project.ini" : mode: "000644" owner: root group: root content: | u max_input_vars=5000 
+7
source

I could not get the previous sentences to work, but I was able to change the php.ini value with .htaccess:

php_value max_input_vars 5000

How to set max_input_vars directive in .htaccess file

0
source

Source: https://habr.com/ru/post/970568/


All Articles