Operating System & Version
CloudLinux 7.9
cPanel & WHM Version
106

littlecharlie

Member
Mar 1, 2023
5
0
1
New York
cPanel Access Level
Root Administrator
Hello.

I'm using cPanel with Lite Speed.

The PHP version is 8.0.

I like to use 8.1 or 8.2.

When I change the version in cPanel PHP manager the Website goes down. (MIME type [application/x-httpd-ea-php82] for suffix '.php' does not allow serving as static file, access denied!)

In Lite Speed admin panel I dont see PHP 8.1 or 8.2 to compile. Only PHP 8.0.
 

Attachments

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,280
2,434
363
cPanel Access Level
Root Administrator
Hey there! The "Compile PHP" tool isn't available for newer versions of PHP, as outlined here:


Code:
There is a functionality available in the LiteSpeed Web Server (LSWS) Web Admin console, “Compile PHP”. This is a legacy function used for previous releases but that will soon be retired. The function is incompatible with all current control panel environments such as cPanel, Plesk, and DirectAdmin. Even in environments without a control panel “Compile PHP” is obsolete. Especially with RPM and Debian Packages providing a more efficient way to install and configure PHP. There are even certain environments ( CloudLinux ) providing their own special packages for PHP that claim to be more secure and stable than that of the standard packages. There are currently not many use cases in which compiling PHP from source is required, but if one does run into such a case, please follow the following steps, but take note this is legacy information.
so it sounds like you won't be able to use that feature for a PHP version higher than 8.0. You'll want to use the cPanel and WHM tools to manage the PHP version directly on the system.
 
  • Like
Reactions: littlecharlie

littlecharlie

Member
Mar 1, 2023
5
0
1
New York
cPanel Access Level
Root Administrator
Hello. Thank you for your info.

I don't mind using cPanel to change PHP versions.

The problem is: When I set PHP 8.1 or 8.2 on ANY cPanel account, the Website goes down with Error 403 and logs shows:

MIME type [application/x-httpd-ea-php82] for suffix '.php' does not allow serving as static file, access denied!

Back to 8.0 and everything works fine again.

I already have PHP 7.4, 8.0, 8.1 and 8.1 installed using EA.

With that in mind, that the compiler will be deprecated, how can i use recent versions of PHP in cPanel?
 

vacancy

Well-Known Member
Sep 20, 2012
557
223
93
Turkey
cPanel Access Level
Root Administrator
This is an issue with litespeed's lsapi module.

What is your Litespeed version? If you have old version litespeed, your integrated lsapi module version is old, old lsapi versions do not support new php versions.

LSAPI 8.0 - lower versions including php 8.1 support.
LSAPI 8.1 - Supports lower versions including php 8.2.

You can see your LSAPI version by uploading a php info file to a site using php 8.0.