• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

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