Two more options is that the script has received an abort from the client (browser issue), and you have run out of available memory to work with.
To trouble shoot this, I'd take it down to a local machine which has PHP available, and run it from the command line. If it works, than it's likely a browser issue. If it doesn't work, then it should give you an error which if I had to guess would be memory.
This may also be an issue with simply the PHP4 version.
header('HTTP/1.1 420 Enhance Your Calm');