Programming Tips - PHP: Warning: preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in [file] on line [line]

Date: 2022feb10 Language: php Q. PHP: Warning: preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in [file] on line [line] A. As the warning says, you can disable PCRE (Perl compatible regular expression) JIT (Just in time) compilation but that will slow things down. To disable it set, in file /etc/php.ini
pcre.jit=0
(Do NOT set this in your .php file as the warning seems to suggest) Or in the <service>.service file set:
MemoryDenyWriteExecute=no
or
MemoryDenyWriteExecute=false (They are equivalent)
And restart <service>
systemctl daemon-reload systemctl restart <service>
The <service>s that might run php include http, php-fpm, crond others