AWS Elastic BeanStalk php.ini文件更新 [英] AWS Elastic BeanStalk php.ini file update
问题描述
我想将我的php Web应用程序的最小上传文件大小从2MB增加到64 MB。我在.ebextensions目录中存储了一个配置文件。.部署到AWS时,发生了错误:
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:
应用程序版本try10中的配置文件.ebextensions / yep.config包含无效的YAML或JSON。 YAML异常:在扫描第7行第7列中的简单键时:在第8行第7列第7行:post_max_size = 64M ^中找不到预期的':',JSON异常:意外字符( f)在位置0。更新配置文件。
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.
下面是我开始使用的配置文件。我花了8个小时进行故障排除,但没有运气。
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
推荐答案
我在Elastic Beanstalk应用程序中成功使用了此功能。只需将以下内容放入应用程序根目录下.ebextensions目录中的yep.config文件中即可。
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
这篇关于AWS Elastic BeanStalk php.ini文件更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!