1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Premature end of script headers: cgi_wrapper

Discussion in 'Plesk 11.x for Linux' started by XuesongC, Oct 3, 2012.

  1. XuesongC

    XuesongC New Pleskian

    10
     
    Joined:
    Oct 3, 2012
    Messages:
    1
    Likes Received:
    0
    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
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,557
    Likes Received:
    1,241
    Location:
    Novosibirsk, Russia
    First of all make sure that you have correct owners and permissions for cgi_wrapper file and for /usr/sbin/suexec
     
  3. TomSherlock

    TomSherlock New Pleskian

    10
     
    Joined:
    Oct 16, 2012
    Messages:
    1
    Likes Received:
    0
    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
     
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,557
    Likes Received:
    1,241
    Location:
    Novosibirsk, Russia
    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.
     
Loading...