I'm getting an intermittent 500 error (internal server error) on a page on a site (linux hosting). Happens maybe half the time I go to the page. I never get it on the server I have on my home machine (windows). The error log says:
Premature end of script headers
I've made sure all the endline characters are Unix rather than Windows. The page is slow, even on my home machine (is runs about 30 queries), but according to the hoster there are no limits set for mysql queries. php is running as cgi rather than an apache module.
Any suggestions? This is pretty important for me to get right, I've spent months on the project and now can't get it to work properly on the live server
The script isn't timing out, I don't think - it seems to be something else. Is it possible that the thread running php is gettig garbage collected or something before execution is finished?