Skip to main content

htaccess files keep getting changed

Comments

8 comments

  • quietFinn

    Go to cPanel -> Software -> MultiPHP Manager
    and set PHP 7.4 for that domain.

    Apparently in your cPanel the setting is Inherit and server's default PHP version is 8.2.

     

    0
  • TXwebdesigner

    Had NO idea I could do that.  I tried that but my only available options are 8.1, 8.2 and 8.3.  Does HostGator have to allow me previous versions or can this be enabled somehow in WHM? 

    Thank you!

    0
  • quietFinn

    I don't think you can do that in reseller WHM, I suggest you contact HostGator support.

     

    0
  • TXwebdesigner

    Checking with them, thanks.  Another question:  Is it 100% necessary to wrap the addhandler text with:

    <IfModule mime_module>

    </IfModule>

    I don't always and I am wondering if that's why cPanel keeps overwriting my 7.4 handlers with the 8.2 handlers.  

    0
  • TXwebdesigner

    Another question:

    Is it less effective to modify the htaccess file directly by editing it on the server versus going into cpanel > Apache Handlers  and setting it there?  

    0
  • cPRex Jurassic Moderator

    What specific change are you making to the .htaccess file?  If you're editing that AddHandler line, then yes, cPanel will overwrite that and you'll want to speak with your host about setting the PHP version correctly for your account.  You can not edit that section of the file manually.

    0
  • TXwebdesigner

    Yes, it's the handler noted in my original post.  Sometimes I set it by editing the htaccess file myself.  Sometimes I set it in the cPanel.  But either way, it keeps getting overwritten by cPanel every few months apparently by a much newer version, which my CMS doesn't work with.  So there's no way to stop these automatic overwrites by cPanel?  

    0
  • cPRex Jurassic Moderator

    Correct - cPanel is always going to overwrite that file to match the settings configured in other areas of the system.  The best thing you can do is contact your host so they can make the changes your want permanent for your account.

    0

Please sign in to leave a comment.