简体   繁体   English

AWS Elastic BeanStalk php.ini 文件更新

[英]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:我想将我的 php Web 应用程序的最小上传文件大小从 2MB 增加到 64 MB。我在 .ebextensions 目录中存储了一个配置文件。部署到 aws 时,发生了错误:

The configuration file .ebextensions/yep.config in application version try10 contains invalid YAML or JSON.应用程序版本 try10 中的配置文件 .ebextensions/yep.config 包含无效的 YAML 或 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. YAML 异常:扫描“”中的简单键时,第 7 行,第 7 列:upload_max_filesize = 64M ^ 找不到预期的“:”,第 8 行,第 7 列:post_max_size = 64M ^ ,JSON 异常:意外字符( f) 在位置 0.. 更新配置文件。

Below is my config file that I am starting out with.下面是我开始使用的配置文件。 I have spend 8 hours troubleshooting with no luck.我花了 8 个小时进行故障排除,但没有运气。 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

I am using this successfully in an Elastic Beanstalk application.我在 Elastic Beanstalk 应用程序中成功地使用了它。 Just put the following into your yep.config file inside of your .ebextensions directory in the root of your application.只需将以下内容放入应用程序根目录下 .ebextensions 目录中的 yep.config 文件中。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM