我在 php-fpm 容器初始化结束时收到此错误。此错误和另一个带有upload_max_filesize
未知条目的错误。
[04-Jun-2018 13:07:59] ERROR: [/usr/local/etc/php-fpm.d/zz-docker.conf:4] unknown entry 'post_max_size'
[04-Jun-2018 13:07:59] ERROR: Unable to include /usr/local/etc/php-fpm.d/zz-docker.conf from /usr/local/etc/php-fpm.conf at line 4
[04-Jun-2018 13:07:59] ERROR: failed to load configuration file '/usr/local/etc/php-fpm.conf'
[04-Jun-2018 13:07:59] ERROR: FPM initialization failed
根据评论中的建议进行更改后:
[20-Jun-2018 10:31:03] ERROR: [/usr/local/etc/php-fpm.d/zz-docker.conf:3] Array are not allowed in the global section
我的zz-docker.conf
:
[global]
daemonize = no
upload_max_filesize = 4M
post_max_size = 32M
[www]
listen = [::]:9000
user = 1001
group = www-data
答案1
正如解释的那样特哈斯·萨拉德,配置应该位于配置文件文件,而不是 fpm 池配置。