Posting a form results in 502 error on PHP, nginx and xdebug
This error broke my head the other day.
Whenever I posted a specific form, I got a 502 error.
I only got it to work when I disabled (as in: rebuild Docker image to not contain) xdebug.
When I posted the form, there was this warning:
PHP Warning: Unknown: Input variables exceeded 1000.
A quick search learned that I could set the PHP option
max_input_vars to 3000. This made the whole thing working again so I could focus on why this big form has more than 1000 input vars….
; file xdebug.ini ;comment all to disable xdebug ;zend_extension="xdebug.so" ;xdebug.mode=debug,coverage ;xdebug.client_host=host.docker.internal ;xdebug.client_port=9003 ;xdebug.start_with_request=trigger ; set PHP directive to allow for maximum 3000 input vars ; PHP Input Vars is a PHP security measure designed to limit the number ; of post variables you can use to execute a function. It defines the ; number of variables your server can use when running a function. max_input_vars = 3000