script to remove cPanel-generated handler from htaccess
EA4 adding this stuff to many htaccess files. Is there any script to remove this from each htaccess at once?
# php -- BEGIN cPanel-generated handler, do not edit
# Set the "ea-php56" package as the default "PHP" programming language.
AddType application/x-httpd-ea-php56 .php .php5 .phtml
# php -- END cPanel-generated handler, do not edit-
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 -
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 -
I use phpselector and apache mod_lsapi, so those stuff in htaccess break php. it is downloading php pages instead of displaying them. 0 -
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 -
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.
Comments
6 comments