Skip to main content

script to remove cPanel-generated handler from htaccess

Comments

6 comments

  • dalem
    That sets your php version you do not want to remove it I suppose you could build a bash script to remove them all and php would revert to inherent but I do not see the reason why you would want to.
    0
  • cPanelMichael
    Hello @whplus, The entries in the .htaccess file make it possible for an individual cPanel user to change the version of PHP assigned to the account as part of the cPanel >> MultiPHP Manager feature and to ensure changes made through cPanel >> MultiPHP INI Editor are preserved if the handler changes in the future. You can read more about this at: Put PHP version choices in server configuration Thank you.
    0
  • whplus
    I use phpselector and apache mod_lsapi, so those stuff in htaccess break php. it is downloading php pages instead of displaying them.
    0
  • cPanelMichael
    I use phpselector and apache mod_lsapi, so those stuff in htaccess break php. it is downloading php pages instead of displaying them.

    Hi @whplus, Can you open a
    0
  • whplus
    i guess it was coming from suphp/cPanelMultiPHP, but it's still there after switched to mod_lsapi/phpselector. i already used bash script to add comment (#) in front of 'AddType application/x-httpd-ea-php56' of each .htaccess
    0
  • cPanelMichael
    Hello @whplus Can you share the ticket number so I can take a look and update this thread with the outcome? While those .htaccess entries are populated, they should not result in a download prompt appearing when attempting to access a PHP file on systems using mod_lsapi. Thank you.
    0

Please sign in to leave a comment.