2

For years, I have been using the following .htaccess for PHP to execute within HTML on Apache at GoDaddy:

AddHandler fcgid-script .html FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .html 

A few days ago, only one of many websites at GoDaddy using this .htaccess started displaying Internal Server Error 500.

I then removed these two lines above from the .htaccess and replaced them with:

AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml .htm .html 

Everything then went back to normal.

What would cause this issue to arise? Why did I have to make this change for the website to go back to normal? What setting may have been changed by GoDaddy? Or is there a setting in cPanel the customer may have changed to create this issue?

3
  • 1
    Web hosts perform necessary updates from time to time which is likely what happened. Commented Jul 4, 2015 at 19:59
  • Yes it is possible. I cannot connect the dots for you in your case, however, I used to be a webhost and updates were routinely required for security. This can include applications such as Apache where between versions old directives have been depreciated or modified and new ones introduced. This is not uncommon especially as fast as web technology has been moving lately. Commented Jul 4, 2015 at 23:34
  • Perhaps someone here will have an idea for you. It is a slow weekend though... so it may take a while. Commented Jul 4, 2015 at 23:37

1 Answer 1

1

This looks like there has been a change in the way PHP is being run on the server. Either because the host has updated/migrated the server or because of a user configuration change. Some hosts allow the user to change the version of PHP being run via an option in cPanel.

AddHandler fcgid-script .html FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .html 

This indicates that PHP is being processed using the FastCGI protocol (mod_fcgid)

AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml .htm .html 

This suggests to me that PHP might now be being run as an Apache module. Although that is not a given, I have seen this suggested for both configurations. However, this is the config setting I need to use on my development server, which runs PHP as an Apache module.

Run phpinfo() on the server(s) to check/compare the PHP version and server API being used.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.