diff --git a/doc/docker/environment-variables.md b/doc/docker/environment-variables.md index 4e7383d..2c3e0aa 100644 --- a/doc/docker/environment-variables.md +++ b/doc/docker/environment-variables.md @@ -6,6 +6,7 @@ * `PUID`: LibreNMS user id (default `1000`) * `PGID`: LibreNMS group id (default `1000`) * `MEMORY_LIMIT`: PHP memory limit (default `256M`) +* `MAX_INPUT_VARS`: PHP max input vars (default `1000`) * `UPLOAD_MAX_SIZE`: Upload max size (default `16M`) * `CLEAR_ENV`: Clear environment in FPM workers (default `yes`) * `OPCACHE_MEM_SIZE`: PHP OpCache memory consumption (default `128`) diff --git a/examples/compose/librenms.env b/examples/compose/librenms.env index a1af74f..d63137c 100644 --- a/examples/compose/librenms.env +++ b/examples/compose/librenms.env @@ -1,4 +1,5 @@ MEMORY_LIMIT=256M +MAX_INPUT_VARS=1000 UPLOAD_MAX_SIZE=16M OPCACHE_MEM_SIZE=128 REAL_IP_FROM=0.0.0.0/32 diff --git a/examples/pwd/librenms.yml b/examples/pwd/librenms.yml index bf1f607..e8ebc6a 100644 --- a/examples/pwd/librenms.yml +++ b/examples/pwd/librenms.yml @@ -10,6 +10,7 @@ x-env-global: &env-global x-envlibrenms: &envlibrenms MEMORY_LIMIT: "256M" + MAX_INPUT_VARS: "1000" UPLOAD_MAX_SIZE: "16M" OPCACHE_MEM_SIZE: "128" REAL_IP_FROM: "0.0.0.0/32" diff --git a/examples/rrdcached-server/librenms.env b/examples/rrdcached-server/librenms.env index 9c934af..b9d3908 100644 --- a/examples/rrdcached-server/librenms.env +++ b/examples/rrdcached-server/librenms.env @@ -1,4 +1,5 @@ MEMORY_LIMIT=256M +MAX_INPUT_VARS=1000 UPLOAD_MAX_SIZE=16M OPCACHE_MEM_SIZE=128 REAL_IP_FROM=0.0.0.0/32 diff --git a/examples/traefik/librenms.env b/examples/traefik/librenms.env index 364b7d7..fa9ee04 100644 --- a/examples/traefik/librenms.env +++ b/examples/traefik/librenms.env @@ -1,4 +1,5 @@ MEMORY_LIMIT=256M +MAX_INPUT_VARS=1000 UPLOAD_MAX_SIZE=16M OPCACHE_MEM_SIZE=128 REAL_IP_FROM=0.0.0.0/32 diff --git a/rootfs/etc/cont-init.d/03-config.sh b/rootfs/etc/cont-init.d/03-config.sh index 6c732f1..95544b5 100644 --- a/rootfs/etc/cont-init.d/03-config.sh +++ b/rootfs/etc/cont-init.d/03-config.sh @@ -33,6 +33,7 @@ LISTEN_IPV6=${LISTEN_IPV6:-true} REAL_IP_FROM=${REAL_IP_FROM:-"0.0.0.0/32"} REAL_IP_HEADER=${REAL_IP_HEADER:-"X-Forwarded-For"} LOG_IP_VAR=${LOG_IP_VAR:-remote_addr} +MAX_INPUT_VARS=${MAX_INPUT_VARS:-1000} MEMCACHED_PORT=${MEMCACHED_PORT:-11211} @@ -58,6 +59,7 @@ sed -e "s/@MEMORY_LIMIT@/$MEMORY_LIMIT/g" \ echo "Setting PHP INI configuration..." sed -i "s|memory_limit.*|memory_limit = ${MEMORY_LIMIT}|g" /etc/php7/php.ini sed -i "s|;date\.timezone.*|date\.timezone = ${TZ}|g" /etc/php7/php.ini +sed -i "s|;max_input_vars.*|max_input_vars = ${MAX_INPUT_VARS}|g" /etc/php7/php.ini # OpCache echo "Setting OpCache configuration..."