How to switch to a different PHP version?

create a new file (or edit the existing one) called .htaccess and add the following line:

To switch to PHP 4.4:
AddHandler application/x-httpd-php4 .php .php4 .php3

To switch to PHP 5.0:
AddHandler application/x-httpd-php5 .php .php5 .php4 .php3

To switch to PHP 5.1:
AddHandler application/x-httpd-php51 .php .php5 .php4 .php3

To switch to PHP 5.2:
AddHandler application/x-httpd-php52 .php .php5 .php4 .php3

To switch to PHP 5.3:
AddHandler application/x-httpd-php53 .php .php5 .php4 .php3

This entry was posted by Arun Ghosh. Bookmark the permalink.