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.

Prevent EA4 MultiPHP from editing .htaccess ?

Discussion in 'EasyApache' started by Forcerdj, Apr 17, 2017.

Tags:
  1. Forcerdj

    Forcerdj Well-Known Member

    Joined:
    Nov 30, 2009
    Messages:
    65
    Likes Received:
    1
    Trophy Points:
    58
    Hi,

    I'm wondering if there is an alternative way for MultiPHP to set PHP version instead of altering the .htaccess file? Each time the PHP version is changed it adds the following code:

    Code:
    # php -- BEGIN cPanel-generated handler, do not edit
    # Set the “ea-php71” package as the default “PHP” programming language.
    <IfModule mime_module>
      AddType application/x-httpd-ea-php71 .php .php7 .phtml
    </IfModule>
    # php -- END cPanel-generated handler, do not edit
    It plays havoc with websites that rely on version control, it can create conflicts in git.
     
  2. cPJacob

    cPJacob cPanel Product Owner
    Staff Member

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

    Unfortunately that's the only way. You can add the .htaccess file to your git repository so that those changes are tracked.
     
  3. Forcerdj

    Forcerdj Well-Known Member

    Joined:
    Nov 30, 2009
    Messages:
    65
    Likes Received:
    1
    Trophy Points:
    58
    Thats a shame.. would this not cause problems in development environments that don't have access to EA PHP7.1 handler application/x-httpd-ea-php71 ?

    The other solution is to not add .htaccess to version control and have different versions per environment.
     
Loading...

Share This Page