3

I received this message during an iTop installation. If you google this, it appears on commercial websites above their content.

Warning: filter_var(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely because of security restrictions. Either grant PHP permission to execute memory, or set pcre.jit=0 in /var/www/html/itop/web/application/utils.php on line 338.

The "fix" is included in the warning message, but I would like to know more about what's going on. Maybe I want PHP to allocate executable memory. Any insight would be appreciated.

Anthony Spano
  • 31
  • 1
  • 3

1 Answers1

4

Recent versions of PHP, systemd, and selinux impose limits and security blocks on access or dynamic allocation of system resources by things like PHP (and php-fpm). For production purposes, the most secure setting is to disable it in your .ini config (pcre.jit=0), however if you want to "unblock" it from selinux:

setsebool -P httpd_execmem on

For php-fpm 7.4 on systemd, some limits are placed in the php-fpm service file, may be at /lib/systemd/system/php-fpm.service depending on your OS. The limits are documented via comments in that file.

Related PHP bugtracker here: https://bugs.php.net/bug.php?id=78630

Brian P
  • 856
  • 7
  • 4