Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have PHP website running under mod_fcgi in apache2.

Problem is that in some cases i get (probability is something like 1/400): Premature end of script headers: controller.php and Internal Server Error

It seems like it's not problem of code that's running because i'm running the same scripts over and over again with similar data.

How do I debug such thing? What could cause such thing?

share|improve this question
1  
Did you find any relevant entry in the apache access or error log? Usually, the log file contains useful information to indicate the problem. –  Khaled May 3 '11 at 10:47
    
[notice] mod_fcgid: process /var/www/vhosts/domain.ltd/subdomains/subdomain/httpdocs/index.php(30219) exit(communication error), terminated by calling exit(), return code: 0 –  martu May 4 '11 at 15:10

1 Answer 1

Most probably the issue is with permissions/ownerships.

Make sure that the permissions/ownerships are correct.

Don't forget to check the permissions/ownerships of complete path.

Example: If the DocumentRoot is

/var/www/domains/yourdomain.tld/public_html/index.html

Then check permissions/ownerships starting from yourdomain.tld

share|improve this answer
    
Does permissions affect 1 out of 500 request because all other requests go just fine. –  martu May 3 '11 at 10:31
    
I did n't get you. Anyway don't forget to check ownerships of complete path. –  Suku May 3 '11 at 10:35
    
I mean permissions seems to be fine because site works. It's only some rare cases that request crashes with premature end of script headers although repeating the same request seems to be work fine. –  martu May 3 '11 at 18:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.