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.

Problem with CSF (possibly PERL).

Discussion in 'Security' started by fedlerner, Oct 21, 2008.

  1. fedlerner

    fedlerner Active Member

    Joined:
    Oct 31, 2007
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Argentina
    I get the following error when trying to access CSF from WHM:
    Code:
    Internal Server Error
    
          Premature end of script headers: /usr/local/cpanel/whostmgr/docroot/cgi/addon_csf.cgi: Please check /usr/local/cpanel/logs/error_log for the exact error.
          
    I did "perl -c /usr/local/cpanel/whostmgr/docroot/cgi/addon_csf.cgi" and I get:
    Code:
    Can't locate Cpanel/Rlimit.pm in @INC (@INC contains: /usr/local/cpanel /usr/lib/perl5/5.8.8/i686-linux /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i686-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at addon_csf.cgi line 19.
    BEGIN failed--compilation aborted at addon_csf.cgi line 19.
    I tried "/scripts/perlinstaller --force" but the problem still exists. The output for this is:
    Code:
    Fetching http://cpan.cpanel.net/cPCPAN/STABLE/modules.versions (0)....@209.85.80.214......connected......receiving...100%......Done
    Method: Perl Expect 
      
    Fetching CPAN timestamp...Done
    Testing connection speed...(this could take a while).....................................Done
    Ping:1000 Testing connection speed to cpan.erlbaum.net using pureperl...(157400.00 bytes/s)...Done
    Ping:2.310 Testing connection speed to cpan.belfry.net using pureperl...(314800.00 bytes/s)...Done
    Ping:1000 Testing connection speed to cpan.glines.org using pureperl...(156800.00 bytes/s)...Done
    Three usable mirrors located
    Mirror Check passed for cpan.belfry.net (/index.html)
    Unknown config variable 'less'
    commit: wrote '/usr/lib/perl5/5.8.8/CPAN/Config.pm'
    perlmod--Install done
     
  2. fedlerner

    fedlerner Active Member

    Joined:
    Oct 31, 2007
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Argentina
    I've also added on the 2nd line of the addon_csf.cgi the following: use CGI::Carp qw(fatalsToBrowser);
    Which makes the error to be shown on the Broswer.
    And this is what I get:
    Code:
    Can't locate Cpanel/Rlimit.pm in @INC (@INC contains: /usr/local/cpanel /usr/lib/perl5/5.8.8/i686-linux /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i686-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at /usr/local/cpanel/whostmgr/docroot/cgi/addon_csf.cgi line 20.BEGIN failed--compilation aborted at /usr/local/cpanel/whostmgr/docroot/cgi/addon_csf.cgi line 20.For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.
     
  3. fedlerner

    fedlerner Active Member

    Joined:
    Oct 31, 2007
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Argentina
    Problem solved.
    v4.16 has a fix for this:
    Code:
    4.16   - Removed port 953 from the TCP and UDP allow lists for new csf
             installations as it's not necessary to whitelist as bind listens on
    	 the localhost device for such control connections by default
    
    	 Added exe:/usr/sbin/nsd, exe:/usr/libexec/dovecot/pop3-login,
    	 exe:/usr/libexec/dovecot/imap-login to new and old cPanel
    	 installations csf.pignore to cater for cPanel support for both nsd and
    	 dovecot (currently in EDGE)
    
    	 Only use Cpanel::Rlimit if it's available in WHM UI
    
    Upgrading CSF from SSH ("csf -u") has fixed the problem.
     
  4. cookiesunshinex

    cookiesunshinex Well-Known Member

    Joined:
    Jun 10, 2005
    Messages:
    77
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for this post.

    csf -u fixed my problem. I also turned on auto-update, which should keep my CSF updated. I hadn't updated it in quite a long time, and didn't realize I needed to update it manually.

    Cheers.
     
Loading...

Share This Page