Websites issue on php 8.1 version (litespeed)

Sajawal

Well-Known Member
Sep 10, 2020
57
7
8
Pakistan
cPanel Access Level
Root Administrator
Hi,

I am facing issues on websites that are using PHP 8.1 versions and the error display while accessing the website is below.


2022-11-07 15:20:04.809911 [ERROR] [2222101] [xxx.xxx.xxx.xxx:10965:HTTP2-3#APVH_domain_name:443] MIME type [application/x-httpd-ea-php81] for suffix '.php' does not allow serving as static file, access denied!
2022-11-07 15:20:04.809928 [NOTICE] [2222101] [xxx.xxx.xxx.xxx:10965:HTTP2-3#APVH_domain_name:443] Content len: 0, Request line: 'GET / HTTP/1.1'
2022-11-07 15:20:04.809938 [INFO] [2222101] [xxx.xxx.xxx.xxx:10965:HTTP2-3#APVH_domain_name:443] File not found [/home/user/domain_name/403.shtml]

Please let me know what can be issue. I have reinstalled the Litespeed version too (still the same issue). Other PHP versions (5.6, 7.0, 7.1-4) are working fine.

Regards,
Sajawal
 
Last edited by a moderator:

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
558
259
138
IN
cPanel Access Level
Root Administrator
Can you paste the <IfModule mime_module> block from the .htaccess file of the website having issue?
 

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
558
259
138
IN
cPanel Access Level
Root Administrator
Try:

lsws web admin >> Server >> Script Handler, add a php81 suffix
 
  • Like
Reactions: cPRex

RevivalTech

Active Member
May 6, 2020
27
5
3
United States
cPanel Access Level
Root Administrator
Recently got with cloudlinux to help take at litespeed config, and solution was to remove both external app and script handler entries, and config the php tab/section.

Currently running php handler section as:
Handler ID: php
Command: /usr/local/bin/lsphp
Handler Suffixes: php, php80, php81