• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    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.

Premature end of script headers: cgi_wrapper

XuesongC

New Pleskian
I am getting Internal Server Error with pdo->fetch() when return data is big like more than 100 rows.

First I find CGI_PHP_BIN is not setting in psa.cofig so I add CGI_PHP BIN dynamic

But I still get server error and in error_log, I find
Premature end of script headers: cgi_wrapper
 
First of all make sure that you have correct owners and permissions for cgi_wrapper file and for /usr/sbin/suexec
 
I am encountering this same error: "Premature end of script headers: cgi_wrapper".

My permission for cgi_wrapper (both directory and file) were previously -rwxr-xr-x and
drwxr-xr-x. I then changed permission to -rwxrwxr-x, drwxrwxr-x. Same error message.

My permission for /usr/sbin/suexec is -r-s--x--- 1 root apache 24360 Jan 25 2012 suexec

What's the next step?

Thanks
 
Make sure that you have the same permissions:

# ll /usr/sbin/suexec
-r-s--x--- 1 root apache 20000 Oct 17 05:41 /usr/sbin/suexec

# ls -al /var/www/cgi-bin/ |grep cgi
drwxr-xr-x 2 root root 4096 Oct 17 05:36 cgi_wrapper

Also there are a lot of other possible reasons on this error:

Premature end of script headers: cgi_wrapper

It is require detailed investigation directly on your server. Therefore I suggest you contact Support Team.
 
Back
Top