Raise phpfpm upload_max_filesize/post_max_size to match the proxy configs
Both nginx (client_max_body_size) and caddy (request_body.max_size) are already configured for 64M uploads, but PHP's own stock defaults (upload_max_filesize=2M, post_max_size=8M) were never raised to match -- so PHP itself truncated/rejected any plant photo upload past 2M (any modern phone camera JPEG) before PlantsModel::editPlantPhoto ever saw it, surfacing as a bare "Errorneous file" 500 with no indication it was ever a size limit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -641,6 +641,17 @@ in {
|
|||||||
user = cfg.user;
|
user = cfg.user;
|
||||||
group = cfg.group;
|
group = cfg.group;
|
||||||
phpPackage = phpPackage;
|
phpPackage = phpPackage;
|
||||||
|
# PHP's own stock defaults (upload_max_filesize=2M, post_max_size=8M)
|
||||||
|
# are far below what both proxy configs below already allow through
|
||||||
|
# (nginx's client_max_body_size / caddy's request_body.max_size, both
|
||||||
|
# 64M) -- without this, PHP itself truncates/rejects any plant photo
|
||||||
|
# upload past 2M (a single modern phone camera JPEG, easily) before
|
||||||
|
# PlantsModel::editPlantPhoto ever sees it, surfacing as a bare
|
||||||
|
# "Errorneous file" 500 with no indication it was ever a size limit.
|
||||||
|
phpOptions = ''
|
||||||
|
upload_max_filesize = 64M
|
||||||
|
post_max_size = 64M
|
||||||
|
'';
|
||||||
settings = {
|
settings = {
|
||||||
"listen.owner" = if cfg.proxy.server == "caddy" then config.services.caddy.user else config.services.nginx.user;
|
"listen.owner" = if cfg.proxy.server == "caddy" then config.services.caddy.user else config.services.nginx.user;
|
||||||
"listen.group" = if cfg.proxy.server == "caddy" then config.services.caddy.group else config.services.nginx.group;
|
"listen.group" = if cfg.proxy.server == "caddy" then config.services.caddy.group else config.services.nginx.group;
|
||||||
|
|||||||
Reference in New Issue
Block a user