NOTE that setting 'auto_detect_line_endings' to true also affects exec() on Windows: the array &$output will technically still be filled with every line of output from the command, but instead contain all output as a single line in $output[0]!