Antworten auf Ihre häufigsten Fragen

[cPanel] Wie kann ich die PHP Version ändern?

English Version below

Dieser Artikel richtet sich an Kunden mit einem cPanel Hosting Produkt.

Sie haben die Möglichkeit in Ihrem MyH die PHP Version zu ändern.

Dies können Sie in unter Einstellungen und dem Reiter "Server" ändern.

Damit wird diese für das komplette cPanel Hosting übernommen.
 

PHP-Version für einzelne Verzeichnisse separat ändern:

Die PHP Version lässt sich über den Menüpunkt "PHP-Version wählen" nicht für einzelne Verzeichnisse ändern. Dies ist jedoch mit einer .htaccess Datei in dem jeweiligen Verzeichnis möglich.


PHP 7.3

<FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
SetHandler application/x-httpd-alt-php73___lsphp
</FilesMatch>


PHP 7.4

<FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
SetHandler application/x-httpd-alt-php74___lsphp
</FilesMatch>


PHP 8.0

<FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
SetHandler application/x-httpd-alt-php80___lsphp
</FilesMatch>


PHP 8.1

<FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
SetHandler application/x-httpd-alt-php81___lsphp
</FilesMatch>

 

Diese Einstellung gilt dann automatisch für alle Unterverzeichnisse, solange nicht eine neue .htaccess mit einem anderen Wert gesetzt wird.

Sie können alle PHP-Versionen auswählen, die auch im cPanel angezeigt werden.

 

 

 

English Version:

This article is aimed at customers with a cPanel hosting product.

You have the option of changing the PHP version in your MyH.

You can change this under Settings and the “Server” tab.

This will be applied for the entire cPanel hosting.

 

Change PHP version for individual directories separately:

The PHP version cannot be changed for individual directories via the menu item "Select PHP version". However, this is possible with a .htaccess file in the respective directory. .
 

PHP 7.3

<FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
SetHandler application/x-httpd-alt-php73___lsphp
</FilesMatch>


PHP 7.4

<FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
SetHandler application/x-httpd-alt-php74___lsphp
</FilesMatch>


PHP 8.0

<FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
SetHandler application/x-httpd-alt-php80___lsphp
</FilesMatch>


PHP 8.1

<FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
SetHandler application/x-httpd-alt-php81___lsphp
</FilesMatch>

 

This setting then automatically applies to all subdirectories, as long as a new .htaccess with a different value is not set.

You can select all PHP versions that are also displayed in the cPanel.


otto.friedrich@hosteurope.de xanthippe.ypsilante@hosteurope.de hercules.ikarus@hosteurope.de