Introduction
A Just-In-Time (JIT) compiler was included in PHP 8's core, but it is disabled by default. This article provides the steps to enable it with ZendOPcache.
Procedure
Please note that in the following procedure, "##" must be replaced by the PHP version without the decimal point.
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Install the ZendOPcache package for the desired PHP version.
- RHEL-based OSes
dnf install ea-php##-php-opcache -y
- Ubuntu
apt install ea-php##-php-opcache -y
- RHEL-based OSes
- Open
/opt/cpanel/ea-php##/root/etc/php.iniin your preferred text editor. - Add the following to the end of the file.
- PHP 8.0-8.3
opcache.jit_buffer_size=16M
- PHP 8.4
opcache.jit_buffer_size=16M
opcache.jit=tracing
- PHP 8.0-8.3
- Save the changes and exit the text editor.
Comments
0 comments
Article is closed for comments.