我在AWS上使用Elastic Beanstalk,我试图覆盖php.ini文件中的一些设置。 我已经在其中使用project.config目录/.ebextensions:
files: "/etc/php.d/project.ini" : mode: "000644" owner: ec2-user group: ec2-user content: | date.timezone = "Europe/Berlin" error_reporting = E_ALL & ~E_STRICT & ~E_NOTICE & ~E_WARNING display_errors = Off
当我重新部署应用程序时,EBS引发以下错误:
The configuration file __MACOSX/gf/.ebextensions/._project.config in application version gf3 contains invalid YAML or JSON. YAML exception: unacceptable character '' (0x0) special characters are not allowed in "<reader>", position 0, JSON exception: Unexpected character () at position 0.. Update the configuration file.
我做错了什么?
更新:
__MACOSX /从档案中删除现在抛出错误:
The configuration file gf/.ebextensions/project.config in application version gf4 contains invalid YAML or JSON. YAML exception: while scanning for the next token found character '\t' that cannot start any token in "<reader>", line 7, column 1: date.timezone = "Europe/Berlin" ^ , JSON exception: Unexpected character (f) at position 0.. Update the configuration file.
这个文件似乎有些问题,但我不能发现什么。
编辑:我需要从文件中删除几个选项卡,并用空格replace。 这固定在下面的答案。
您正在使用Macintosh,并且让隐藏的__MACOSX目录进入您的部署。 这些文件是在压缩目录时生成的,用于存放OS X特定资源分支,这些分支在任何其他操作系统上都是无用的。
如果您打算使用zip打包您的应用程序以进行部署,则需要将这些更好地移除,以使用git ,Capistrano或实际适合部署软件的内容。