changes to set env vars if www-data excutes the script with sudo
The default setting of the sudoers file resets the environment when executing a script via sudo. So the xdebug configuration via environment vars does not work. To change this the sudoers entry must contain SETENV and sudo has to be executed with -E parameter.