PCRE JIT error while building php7.3 and 7.4

Sempiterna

Verified User
Joined
Jun 21, 2014
Messages
21
Location
The Netherlands
I'm trying to use custombuild to build php7.3 and 7.4, but during the process it quits with the following error:

Code:
Fatal error: Uncaught InvalidArgumentException: RegexIterator::__construct(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Eithemission to allocate executable memory, or set pcre.jit=0 in /usr/local/directadmin/custombuild/php-7.4.8/ext/phar/phar.php:1133
Stack trace:
#0 /usr/local/directadmin/custombuild/php-7.4.8/ext/phar/phar.php(1133): RegexIterator->__construct(Object(RecursiveIteratorIterator), '/\\.svn/')
#1 /usr/local/directadmin/custombuild/php-7.4.8/ext/phar/phar.php(1077): PharCommand::phar_add(Object(Phar), 0, '/usr/local/dire...', NULL, '/\\.svn/', Object(SplFileInfo), NULL, true)
#2 /usr/local/directadmin/custombuild/php-7.4.8/ext/phar/phar.php(225): PharCommand->cli_cmd_run_pack(Array)
#3 /usr/local/directadmin/custombuild/php-7.4.8/ext/phar/phar.php(2089): CLICommand->__construct(19, Array)
#4 {main}
  thrown in /usr/local/directadmin/custombuild/php-7.4.8/ext/phar/phar.php on line 1133
make: *** [ext/phar/phar.phar] Error 255
make: *** Waiting for unfinished jobs....

The error suggests to set pcre.jit=0, but where do you set it? I assume in "a" php.ini. Which one does custombuild use during the build process?
 
I don't know anything about this but the error seems to suggest that it should be set in
/usr/local/directadmin/custombuild/php-7.4.8/ext/phar/phar.php
 
Then I guess the error message is incorrect because it says:

set pcre.jit=0 in /usr/local/directadmin/custombuild/php-7.4.8/ext/phar/phar.php
 
I found that one as well, and it gives the suggestion to add it to the php.ini (which one). I got around it for now by temporarily rebooting in a non grsec protected kernel. Luckily this is a test system.
 
Probably

/usr/local/php73/lib/php.ini
/usr/local/php74/lib/php.ini
 
Back
Top