Using .htaccess Files to Manage PHP File Extensions
Your hosting account uses PHP files in the following way:
-
PHPfiles — Your hosting account's PHP version. For more information, see Viewing or Changing Your PHP Language Version. -
PHP4files — PHP 4 -
PHP5files — PHP 5
However, you can also change how your hosting account uses PHP files with a .htaccess file located in your root directory.
The following entries in a directory's .htaccess file designate PHP files to run under PHP 5 and PHP4 files to run under PHP 4.
AddHandler x-httpd-php .php4
Hosting accounts should use the following entries for CGI:
AddHandler x-httpd-php-cgi .php4
Or, 4GH accounts can use these entries with FastCGI:
AddHandler x-httpd-php .php4
If you want your 4GH account to use PHP 5.3.x instead of PHP 5.2.x, use the following entry:
NOTE: We only offer PHP 5.3.x with fastcgi using fcgid.
Changes made to an existing .htaccess file will be seen immediately. When creating new .htaccess files or deleting existing .htaccess files, you might not see changes for up to an hour.
You can also change your hosting account's default PHP version through the Hosting Control Center. For more information, see Viewing or Changing Your PHP Language Version.