Maybe something turns off error output. (I understand that you are trying to say that other scripts properly output their errors to the errorlog?)
You could start debugging the script by determining where it exits the script (start by adding a echo 1; exit;
to the first line of the script and checking whether the browser outputs 1
and then move that line down).