4

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?

martu
  • 41
  • 3
  • 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 03 '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 04 '11 at 15:10

1 Answers1

0

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

Suku
  • 2,006
  • 13
  • 15
  • Does permissions affect 1 out of 500 request because all other requests go just fine. – martu May 03 '11 at 10:31
  • I did n't get you. Anyway don't forget to check ownerships of complete path. – Suku May 03 '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 03 '11 at 18:27