• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

PHP FastCGI/CGI Problem

N

N3cTr0

Guest
Hi,

Recently setup plesk on a dedicated server. Setup my first domain and ran PHP as FastCGI.

I got nothing but Server 500 Errors:

[Sat Dec 18 12:27:40 2010] [error] [client *.*.*.102] Premature end of script headers: index.php
[Sat Dec 18 12:28:57 2010] [warn] [client *.*.*.34] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server

Same error running it as CGI. But if I run it as an Apache module, it works fine.

What can I do to resolve this problem?
 
Hello Igor,

We also have this problem but do not have anything listed under
# grep CGI_PHP_BIN /etc/psa/psa.conf
and looking at the file in vi there is no reference to CGI_PHP_BIN at all. Do we add this manually if it to get PHP over FastCGI to work if the variable doesn't exist?

This problem has only just started after an upgrade from 10.3.1 to 10.4.4.

Thanks
 
For me the origin was error_reporting. It was set to not show php errors on the webpage but to write them in a log.
In your case "Premature end of script headers: index.php " is actually php error, but due to the use of (fast)cgi it causes apache to end up in a 500 error.

Solution (worked for me):
Try to enable showing the errors on your webpage instead of writing them into the log - and be sure to use the correct php.ini file for the relevant domain. Sometimes setting the values via plesk did not work for me... Sure a bug, but I am too lazy to report it right now (waiting for someone else having the same issue and reporting it :p)

Regards
 
Hello sltmedia,

That's not really a viable solution and could lead to a whole range of problems: writing errors to the output is a massive security risk.
 
I'm also having the same problem since upgrading to PHP 5.4.

[Thu Aug 08 10:55:44 2013] [warn] [client 86.134.86.83] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Thu Aug 08 10:55:44 2013] [error] [client 86.134.86.83] Premature end of script headers: index.php

Switching to "apache" does fix it for now, but I would like to use FastCGI. Exactly the same as N3cTr0 (Running Plesk 10.4.4 here).
 
safe-mode from PLESK to be set off has made the trick, but also in php.ini should disable all, safe_mode, magic_quote, and watch logs.
The problem is why I am disapointed, how can this happened?
How can allow PLESk Project Manager to update to a major release of PHP, when everyone complained on forum that it is dangerous, a lot od scripts are incompatible and so on, to do this.
If they decided to force update and PLESK 11.5 support multiple PHP version, why not installed as an alternative as a second PHP solution and in time to not support 5.3??
If you ask me, the person/team who get this decision, should be fired, sorry to say this, but thousand of servers was affected.
Just we have 15 servers and around 1000 clients. Now I get daily phones that site does not working because old CSCart, old WP or etc. SHAME, SHAME, SHAME! Very disapointed!
 
Back
Top