Important! If you have PHP errors after adding the. htaccess your site in that directory will use that version of PHP. Once you add the appropriate version code to your. php5 PHP 7.4 # Use PHP 7.4 as defaultĪddHandler application/x-httpd-php74. php5ĪddHandler application/x-httpd-php73. php5 PHP 7.2 # Use PHP 7.2 as defaultĪddHandler application/x-httpd-php72. php5 PHP 7.1 # Use PHP 7.1 as defaultĪddHandler application/x-httpd-php71. php5 PHP 7.0 # Use PHP 7.0 as defaultĪddHandler application/x-httpd-php70. php5 PHP 5.6 # Use PHP 5.6 as defaultĪddHandler application/x-httpd-php56. php5 PHP 5.5 # Use PHP 5.5 as defaultĪddHandler application/x-httpd-php55. php5 PHP 5.4 # Use PHP 5.4 as defaultĪddHandler application/x-httpd-php54. PHP 5.3 # Use PHP 5.3 as defaultĪddHandler application/x-httpd-php53. Below is the code you need for each PHP version. htaccess of the directory you want to change the PHP version for. Using Multiple PHP Versionsĭepending on what version of PHP you want to use, you will need to place the following code in the. This will make the specific directory use the System’s default PHP version. htaccess: # Use system PHP5 as defaultĪddHandler application/x-httpd-php5. To use the system default PHP, use the following in. Here is how to use any combination of other PHP versions in any directory when web hosting with PHP. For example, you can have PHP 5.4 for the site in public_html and then use PHP 5.2 in a subdirectory. When using different software on one account, you may need to use one version of PHP while running multiple PHP versions on different domains.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |