I have PHP installed as a CGI, using Apache 1.3.19. Some, maybe 10% of the PHP scripts that I run return with a 500 error and Apache's error log cries "premature end of script headers". When I run any of the guilty scripts from command line, they usually create a segfault. I am using PHP 4.0.5 and 4.0.4pl1 also had the same problems with this error. What could be the solution?