EasyApache 4 keeps putting characters that cause error 500 in PHP handler in htaccess file
My .htaccess file keeps getting changed to the following causing an error 500 and taking the sites down. Even though I remove the extreanous characters to get the site back up. sooner or later it gets changes back cause the error 500. It is random when it happenss. What couls be the cause? I have attached a picture of the actual statements
# php -- BEGIN cPanel-generated handler, do not edit
# Set the """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""ea-php72""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" package as the default """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""PHP""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" programming language.
AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
# php -- END cPanel-generated handler, do not edit
-
Hey there! That definitely looks like odd behavior and I can't say that I've seen anything quite like that. In this situation, when we can't be sure what action is making changes to a file, I like to setup an audit watch to see if we can catch the change happening. This is something that would need to be setup by an admin with root access to the machine, but details on that can be found here: tickets.cpanel.net as we're always happy to check out the system. 0 -
Aloha cPRex, Thanks for your reply. I will look at the audit procedure. The changes only happen to the PHP 7 handler when some system program notices that the text has changed or that the text is not present. It is strange indeed, after I remove the extraneous characters, the system will work for days until the automatic change happens again. 0 -
That is curious for sure - having the audit setup would hopefully let you know more about what specific process or command is changing the file. If you don't make any progress with that, our support team is always available to look into this as well. 0 -
It is strange. I did some more research on it and found that it is only replacing certain characters with the problem characters. The characters are non standard characters double quotes around eaphp56 and PHP. I replace those quotes with quotes that I can type ( " replaced with " ). We'll see how that goes. # 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 0 -
The quote marks that are in the PHP handler comment are Unicode and the file is UTF8. So when an application updates the .htaccess file the Unicode characters get converted to junk. 0 -
Hello again, Were you able to find what application was making those changes? I did look through past tickets and hadn't seen anything quite like this. I did confirm the character used us the Unicode double-quotation mark, so it shouldn't be anything out of the ordinary. 0
Please sign in to leave a comment.
Comments
6 comments