Nedenstående metode til, at skifte PHP-version er forældet og vi henviser istedet til at benytte phcli. Dog benyttes denne metode stadig hvis der er behov for, at køre en specifik PHP-version i én specifik mappe/folder.
The following method for switching PHP-version is outdated and we refer to using phcli instead. However, this method is still used if there is a need to run a specific PHP-version in a specific directory.
Hos Powerhosting tilbyder vi pt. flg. PHP-versioner:
At Powerhosting we offer these PHP versions:
PHP 5.6
PHP 7.0
PHP 7.1
PHP 7.2
PHP 7.3
PHP 7.4
PHP 8.0
PHP 8.1
PHP 8.2
PHP 8.3
Det er muligt at skifte frit mellem alle 6 vha. en simpel switch/bracket i .htaccess. Man indsætter blot nedenstående bracket i .htaccess og kan derefter fjerne # ud for den version af PHP man ønsker at afvikle. I CLI-kommandoer skal man så skrive fx. php7.1 osv. i stedet for blot php, hvis man har valgt en php7. Det er ikke nødvendigt ved php5:
It is possible, freely, to change between all 6 versions by means of a simle switch/bracket in .htaccess. Put the lines below in the top of .htaccess and remove the # in front of the PHP version you want. In CLI commands you must use e.g. php7.1 a.s.o. instead of just php if you have chosen a php7. Not neccessary with php5:
############################################
## this line is specific for powerhosting.dk
<FilesMatch "\.php$">
## Uncomment below to run php5.6
# SetHandler proxy:fcgi://php56-fpm
## Uncomment below to run php7.0
# SetHandler proxy:fcgi://php70-fpm
## Uncomment below to run php7.1
# SetHandler proxy:fcgi://php71-fpm
## Uncomment below to run php7.2
# SetHandler proxy:fcgi://php72-fpm
## Uncomment below to run php7.3
# SetHandler proxy:fcgi://php73-fpm
## Uncomment below to run php7.4
# SetHandler proxy:fcgi://php74-fpm
## Uncomment below to run php8.0
# SetHandler proxy:fcgi://php80-fpm
## Uncomment below to run php8.1
# SetHandler proxy:fcgi://php81-fpm
## Uncomment below to run php8.2
# SetHandler proxy:fcgi://php82-fpm
## Uncomment below to run php8.3
# SetHandler proxy:fcgi://php83-fpm
</FilesMatch>
############################################
PHP ændringer kan også laves via vores CLI tool PHCLI
PHP changes are also able to be made with our CLI tool PHCLI