From 237da29522df2d77ee220af07d3a913741793078 Mon Sep 17 00:00:00 2001 From: liujian Date: Thu, 24 Jun 2021 16:05:45 +0800 Subject: [PATCH] fix: make throws an exception: 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 /Users/***/Downloads/php-8.0.7/ext/phar/phar.php:1136 --- ext/phar/phar/pharcommand.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/phar/phar/pharcommand.inc b/ext/phar/phar/pharcommand.inc index a31290eee75fe..e54901d8fb216 100644 --- a/ext/phar/phar/pharcommand.inc +++ b/ext/phar/phar/pharcommand.inc @@ -642,6 +642,8 @@ class PharCommand extends CLICommand $dir = new InvertedRegexIterator($dir, $invregex); } + ini_set('pcre.jit', '0'); + try { foreach($dir as $file) { if ((empty($stub) || $file->getRealPath() != $stub->getRealPath()) && !is_dir($file)) {