How to Change PHP Version via .htaccess File

Last Updated on Thursday, 14 February 2013 09:29 Written by Naveed Ashraf Thursday, 14 February 2013 12:00

On a server, there is possibility to have more than one compiled php version. If you wish to use a php version other than the default one, you can use the .httaccess file for this purpose.

If the default php version on a server is set to php 5, then by default, all domains will use php5.  If a certain application installed on a domain runs only under php4, thenit is necessary that the domain uses php4

Open .htaccess by any suitable editor. Put the following code into it:

Server without suphp enabled

AddType application/x-httpd-php4 .php .htm .html

Server with suphp enabled

AddHandler application/x-httpd-php4 .php .htm .html

In the same way, you can enable other php versions if they are installed/compiled over the server.

Looking for quality web hosting? Look no further than Arvixe Web Hosting!

Learn More

Search

Authors

Web Hosting

Linux Hosting
ASP .NET Hosting
Business Hosting
Reseller Hosting
E-Commerce Hosting
Dedicated Servers

Acceptable Use Policy
Terms of Service
Privacy Policy

Affiliate Program
Site Map

Blog Hosting

WordPress Hosting
ExpressionEngine Hosting
Movable Type Hosting
Habari Hosting
Textpattern Hosting


CMS Hosting

Joomla Hosting
Drupal Hosting
MODX Hosting
Concrete5 Hosting
Xoops Hosting
Shopping Cart Hosting

nopCommerce Hosting
OpenCart Hosting
Magento Hosting
osCommerce Hosting
Tomato Cart Hosting


Video Sharing Software Hosting

ClipBucket Hosting
ClipShare Hosting
osTube Hosting
vShare Hosting
MediaXXX Hosting
Forum Hosting

XenForo Hosting
vBulletin Hosting
MyBB Hosting
phpBB Hosting
Simple Machines Hosting


Social Network and Community Website Hosting

SocialEngine Hosting
Elgg Hosting
SkaDate Hosting
Dolphin Hosting
phpfox Hosting
Copyright © 2003-2013 Arvixe, LLC. All trademarks are property of their legal owner.