The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[FIX] premature end of script headers problem in libperl

Discussion in 'General Discussion' started by KenMaier, Oct 8, 2004.

  1. KenMaier

    KenMaier Member

    Joined:
    Nov 5, 2002
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    A recent WHM/CPANEL upgrade (?) seems to have broken suexec on our servers. It was most visible with all perl scripts because they were failing with the following error:

    [Fri Oct 8 23:12:01 2004] [error] [client xx.xx.xx.xx] Premature end of script headers: /home/user/public_html/cgi-bin/myperlscript.cgi
    /usr/local/apache/bin/suexec: error while loading shared libraries: libperl.so:
    cannot open shared object file: No such file or directory


    For CPANEL/WHM, it was breaking all incoming requests to /cpanel, /whm and /webmail. And unfortunately, broke our MovableType installations (since the CGI component was busted).

    In any case, the problem ended up being suexec not being able to find libperl.so -- some other posts in this forum hinted at this with the following command revealing the problem:

    ldd /usr/local/apache/bin/suexec

    (output will indicate libperl.so cannot be found)

    In our case, libperl.so was missing in /lib

    Solution:

    1. Other posts on this site say to disable suexec support in your apache setup.
    2. Copy or symlink /usr/local/cpanel/perl/libperl.so into /lib/libperl.so

    CPANEL/WHM seems to delete /lib/libperl.so every so often, so you'll need to revisit it should it break again.

    Once you replace libperl.so, run ldd again on suexec to make sure libperl is found. If it is, restart apache (service httpd stop; service httpd start) and you should be all set.

    -ken

    PS: Can anyone explain why this broke in the first place?
     
Loading...

Share This Page