skip to Main Content

Currently using “AddHandler application/x-httpd-ea-php56 .php” in my htaccess file in the root of the domain since that is the only thing that works.

If I try to switch to php7, the page either tries to download or it gets the HTTP ERROR 500.

The following downloads the page:

AddHandler application/x-httpd-ea-php7 .php

The following gives me 500 error:

AddHandler application/x-httpd-ea-php71 .php

Downloads the page:

AddHandler x-httpd-php7 .php

500 error:

<IfModule mime_module>
  AddType application/x-httpd-ea-php72 .php .php7 .phtml .htm .html
</IfModule>

500 error:

<IfModule mime_module>
  AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>

downloads the page:

AddHandler application/x-httpd-php7 .php .html .htm .phtml .shtml

etc

In subdirectories, I can use the following just fine:

<IfModule mime_module>
  AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>

Try to use that in the root .htaccess file…poof no cookie.

If I add AddHandler application/x-httpd-ea-php56 .php back in, it works fine again.

I have also tried other some other methods I found searching around. Has anyone else had this issue? The host is Bluehost.

The only other things semi-related that I have in the root htaccess file is the following, but I have tried removing it as well with no change to the results:

AddHandler server-parsed .html
AddHandler server-parsed .htm

3

Answers


  1. It seems that there are PHP version conflicts on your server, the easiest way to solve this is to just update the PHP version on your server.

    Take a Backup before doing anything!

    Go to the terminal of your server and type this: php -v

    This should give you the PHP version installed on your server, now make sure that your .htaccess handlers match the installed PHP version.

    So for example, if you have this as the handler: AddHandler application/x-httpd-ea-php71 .php your PHP version should be 7.1

    If you change the .htaccess handlers without updating your PHP version, you will get a conflict.

    This is Bluehost’s official guide https://my.bluehost.com/hosting/help/htaccess-php-handlers

    I hope this helps!

    Login or Signup to reply.
  2. I had the same issue with a WordPress site when a tried to update the php version using cpanel. There was the follow directive in .htaccess that locked php version in 7.2 no mather what version I chosed in CPanel.

    <IfModule mime_module>
      AddHandler application/x-httpd-ea-php72___lsphp .php .php7 .phtml
    </IfModule>
    

    It’s broke wordpress every time a tried to change this directive.

    The solution was remove this directive.

    Login or Signup to reply.
  3. For Godaddy, my solution was, after updating the php to add the following line (Taking the old php declaration out):

    AddHandler application/x-httpd-alt-php74___lsphp .php .html .htm

    It really just required the explicit declaring of the page type.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search