EasyApache modifies .htaccess files?

jack01

Well-Known Member
Jul 21, 2004
200
0
166
Each time we recompile apache/php with EasyApache at least one of the our clients' .htaccess is modified by commenting out the following:

AddHandler application/x-httpd-php5 .php .html .htm

Any idea how to stop this happening?
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
In WHM-> Server Configuration -> Tweak Settings -> System
set
Depth to recurse for .htaccess checks = 0
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

This was likely the result of the update_php_mime_types script. You can run the following command if you want to ensure EasyApache skips this task:

Code:
touch /var/cpanel/easy_skip_update_php_mime_types
However, note that it's important to open a bug report if this is happening in cases where it should not:

Submit A Bug Report

Thank you.
 

Maknet Corp

Member
Jul 14, 2015
24
2
3
Canada
cPanel Access Level
Root Administrator
I'm sorry, I'm having the same issue and I don't totally understand what the fix is.

If I touch that file, EasyApache will magically ignore commenting out the .htaccess file always?


Incidentally, I'm glad someone pointed me in the direction of the tweak .htaccess-depth, because otherwise, I didn't understand why my .htaccess file was changing!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
If I touch that file, EasyApache will magically ignore commenting out the .htaccess file always?
The issue reported in the initial post occurred because the /usr/local/cpanel/bin/update_php_mime_types script ran during EasyApache. Creating that file prevents /usr/local/cpanel/bin/update_php_mime_types from running during EasyApache, and thus those entries in the .htaccess file are not modified.

Thank you.