How to Change PHP Version via .htaccess File

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!

Tags: , , , , , , , , , | Posted under Internet, Programming/Coding, Using Arvixe | RSS 2.0

Leave a Reply

Your email address will not be published. Required fields are marked *