Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Change PHP Version EasyApache 3.24.7 Issue

Discussion in 'EasyApache' started by vincentg, Oct 26, 2016.

  1. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    143
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    new york
    When trying to run it in order to change the current PHP version I get an error
    Code:
    Distilled successfully
    !! Executing custom hook '/usr/local/cpanel/scripts/preeasyapache' !!
    
    Backing up COMODO WAF mod_security configuration
    cp: cannot stat `/etc/apache2/conf.d/modsec2.conf': No such file or directory
    !! Done executing '/usr/local/cpanel/scripts/preeasyapache' !!
    
    !! '/usr/local/cpanel/scripts/preeasyapache 3.34.7 9999 ' failed with exit code '256' !!
    
    No log entry is created on this error.
     
    #1 vincentg, Oct 26, 2016
    Last edited by a moderator: Oct 29, 2016
  2. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    143
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    new york
    I tried this on a second server - same problem

    I assume that this is due to the use of COMODO WAF
     
  3. cPJacob

    cPJacob cPanel Product Owner
    Staff Member

    Joined:
    May 2, 2014
    Messages:
    604
    Likes Received:
    94
    Trophy Points:
    103
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi,

    Have you attempted to migrate these systems to EA4? It appears that EA3 is attempting to stat a directory in '/etc/apache2', but that directory is only valid on EA4.

    Could you see if '/etc/cpanel/ea4/paths.conf' exists? If it does, can you run the following?
    Code:
    rpm -qf /etc/cpanel/ea4/paths.conf
    Thanks!
     
  4. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    143
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    new york
    That path doesn't exist

    All servers are using EasyApache 3 not 4
     
    #4 vincentg, Oct 29, 2016
    Last edited: Oct 29, 2016
  5. cPJacob

    cPJacob cPanel Product Owner
    Staff Member

    Joined:
    May 2, 2014
    Messages:
    604
    Likes Received:
    94
    Trophy Points:
    103
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi,

    It appears that COMODO WAF is attempting to use an EA4 path for it's rules, instead of EA3. I'd recommend putting in a ticket when you're able to so we can take a look at this.

    Thanks!
     
  6. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    143
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    new york
    I made a mistake in the title - It should be EasyApache 3.34.7

    If that is so then wouldn't it just be simple to just copy the rules to the path /etc/apache2/conf.d/modsec2.conf

    The rules for cwaf is in /var/cpanel/cwaf/tmp/rules/

    Also there has been no problem with EasyApache with any prior version and CWAF
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,424
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @vincentg,

    The path and directory structure is reorganized in EasyApache 4, so you can't copy the rules to the EA4 path. Here's a document that explains the path differences:

    Introduction to EasyApache 4 - EasyApache 4 - cPanel Documentation

    As a workaround, you could temporarily create the following directory structure and file if you simply wanted the EasyApache build to complete:

    Code:
    /etc/apache2/conf.d/modsec2.conf
    However, you would have to remove it after EasyApache completes. The other option is to upgrade to EasyApache 4:

    How to Install or Uninstall EasyApache 4 - EasyApache 4 - cPanel Documentation

    I also encourage you to report the issue to the Comodo CWAF plugin support forums at:

    Free Modsecurity rules - Comodo Web Application Firewall

    Thank you.
     
  8. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    143
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    new york
    Created the folder and sub folder within the folder /etc
    Created an empty file.
    It worked
     
    cPanelMichael likes this.
Loading...

Share This Page