Change PHP version for a specific domain on a hosting account
Author: admin admin Reference Number: AA-00391 Views: 12525 Created: 2013-05-09 08:48 Last Updated: 2019-04-29 13:27 0 Rating/ Voters

If one domain / script on your hosting account required a different version of php never fear !

----------------------------------------------------------------------

To change to version 5.2 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php52___lsphp .php .php5 .phtml
</IfModule>

----------------------------------------------------------------------

To change to version 5.3 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php53___lsphp .php .php5 .phtml
</IfModule>

----------------------------------------------------------------------

To change to version 5.4 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php54___lsphp .php .php5 .phtml
</IfModule>

----------------------------------------------------------------------

To change to version 5.5 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php55___lsphp .php .php5 .phtml
</IfModule>

----------------------------------------------------------------------

To change to version 5.6 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php56___lsphp .php .php5 .phtml
</IfModule>

---------------------------------------------------------------------

To change to version 7.0 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php70___lsphp .php .php5 .phtml
</IfModule>


---------------------------------------------------------------------

To change to version 7.1 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php71___lsphp .php .php5 .phtml
</IfModule>


---------------------------------------------------------------------

To change to version 7.2 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php72___lsphp .php .php5 .phtml
</IfModule>


As soon as these lines are added to the .htaccess file then that folder will then use the defined version of php !


Quick Jump Menu