How to change php version by htaccess, How to use php5 version by htaccess, Switch to different version of php by htaccess | PHP Freelancer. Hi Friends, In this article I will explain how can we change version of PHP by htaccess. Sometime some application need php version 5 instead of 4 and on server php4 version used by default but If php5 already installed on server then we can use php5 version by putting one line in .htaccess file.
If you want to use php5 version for a particular application and on server php4 and php5 both are available and php4 is by default , So to use php5 for that application follow these rules : For e.g. our site application is in right now it is using php4 but you want to use php5 for this then, 1. Make one .htaccess file in if not exists. 2. AddHandler application/x-httpd-php5 .php .php5 .php4 .php3 OrAddHandler x-httpd-php5 .php You can try both one by one in case if any one is not working. Now check your application site, It will use php5 version. Subtle Patterns | Free textures for your next web project. Display and present responsive web designs. Mobile Patterns - Lists.