Then you will need to add Script Handler so click on Script Handler -> Add. Make sure to configure handler type as “LiteSpeed SAPI” and handler name as “[Server Level]: lsphp72”

Save and restart LiteSpeed web server. Now when you configure php 7.2 for a particular account from WHM -> MultiPHP Manager and access the website in browser, you will notice error “503 Service Unavailable, Please try again later”

On debugging you will notice logs in /usr/local/apache/logs/error_logs as follows:

The error is likely due to the fact that the grsec kernel which is installed on server from ASL, is assuming php 7.2 as insecure and hence, restricting it. This means that PHP is trying to violate the kernels memory protection features. Unfortunately, PHP 7 needs to operate in this insecure manner. To allow PHP to operate this way, follow the steps below:

The solution here is to configure the system to allow php to run insecurely. This can be achieved by :

Stopping Litespeed webserver on the server using command:

cd /usr/local/lsws/bin

./lswsctrl stop

Then give the command:

paxctl -m /opt/cpanel/ea-php72/root/usr/bin/lsphp

If you receive error similar to “file /opt/cpanel/ea-php72/root/usr/bin/lsphp does not have a PT_PAX_FLAGS program header, try conversion” then try following solution

paxctl -c /opt/cpanel/ea-php72/root/usr/bin/lsphp

and finally restart Litespeed webserver using command:

./lswsctrl restart

Accessing your website now configured with php 7.2 version on a cPanel server with Litespeed and ASL (Automic Secure Linuc) or grsec kernel should now work sucessfully.