fcgid php can't launch for scripts in subdir

I've noticed that if I have a php script in a subdir of the document root, and if the virtual server is set to use the fcgid wrapper for php, then I get a 500 Internal Server Error if I try to load that php. The error log has the usual "Premature end of script headers" message and no other details. However I found that if I first access a php script in the document root then the one in the subdir works fine after that (unless there is no traffic for a while and the fcgi processes are cleaned up.) It looks like Apache is either not starting the fcgi process at all, or it is getting an failing immediately, unless the first script launched after Apache restart (or timeout) is one in the document root.

Any known workarounds for this?

Status: 
Closed (fixed)

Comments