6

I just have installed xampp with php 7.3.1 on mac with OS El capitan.

The problem that when i run a WordPress project will show:

Warning: preg_replace(): JIT compilation failed: no more memory in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-includes/formatting.php on line 2110 Warning: preg_match(): JIT compilation failed: no more memory in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-includes/functions.php on line 4947 Warning: preg_replace(): JIT compilation failed: no more memory in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-includes/functions.php on line 4843 Warning: preg_match(): JIT compilation failed: no more memory in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-includes/functions.php on line 4947 Warning: preg_match(): JIT compilation failed: no more memory in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-includes/functions.php on line 4947

  • do you get more verbose errors in your error log. seeing the stack trace on that would be helpful – mrben522 Jan 22 at 14:17
  • I'm getting the same errors on my local installation. I have to refresh every new page load to temporarily hide the errors. – Paul Shryock Jan 23 at 15:55
  • @PaulShryock I did downgrade to old php 7.1 and fixed. Thanks – A.Alshaikhli Jan 23 at 19:57
8

I added the following line to the php.ini and restarted Apache and it worked (Xampp on macOS):

pcre.jit=0

This disables PCRE's just-in-time compilation.

Further information:

If you can't find the location of php.ini and are using Xampp, go to localhost and select the PHP information link and it is displayed there.

  • This answer looks good - I would add a link to the manual for this specific option to add context: php.net/manual/en/pcre.configuration.php#ini.pcre.jit – phatskat Feb 4 at 2:48
  • For me this didn't work. Then I added 'php_value pcre.jit 0' to my .htaccess and that fixed it for me. – Niqql Feb 26 at 9:33
  • This worked for me. I would expect that the reason that it didn't work for @Niqql is that they changed the wrong php.ini file (there are often several and figuring out which one is the correct one) That said, their solution is just as good. Maybe even better because it only effects the site below it in the file tree. – vlasits May 24 at 18:07
0

You need downgrade your php7.3 to php7.1 version. I have the same problem when trying to change php version to the upper.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.