Uncaught ErrorException: preg_match_all(): JIT compilation failed: no more memory

11,984

Solution 1

If pcre.jit = 0 pcre.jit=0 pcre.jit = Off in php.ini, not worked, try this:

I suppose you installed php 7.3 through homebrew.

If so, create a zzz-myphp.ini in /usr/local/etc/php/7.3/conf.d with the following content:

; My php.ini settings
; Fix for PCRE "JIT compilation failed" error
[Pcre]
pcre.jit=0

If this also doesn't work, uninstall php7.3 and install 7.2 or 7.1

brew uninstall [email protected]

Solution 2

Edit the following file

/usr/local/etc/php/7.3/php.ini

Find and change the pcre.jit variable

pcre.jit=0

If the issue remains

Try restarting your computer.

Share:
11,984

Related videos on Youtube

Derick Alangi
Author by

Derick Alangi

Software Engineer @Wikimedia & @WikiTeq ✦ Freelancer @Upwork

Updated on June 04, 2022

Comments

  • Derick Alangi
    Derick Alangi almost 2 years

    I just upgraded my PHP on macOS from 7.2 to 7.3 and while trying to run composer update on a project of mine, I get the error;

    PHP Fatal error:  Uncaught ErrorException: preg_match_all(): JIT compilation failed: no more memory
    

    I've run a few Google searches; it looks like the issue is new, and I couldn't find any working documentation online.

    Is this an issue related to PHP 7.3 and Composer? If so, how do I resolve it? Thanks for your help in advance.

  • Basavaraj Hadimani
    Basavaraj Hadimani almost 5 years
    xSavitar, Please accept the answer, if you find it as the best among others.
  • AVProgrammer
    AVProgrammer almost 5 years
    "I suppose you installed php 7.3 through homebrew." Why yes, yes I did. Going to follow your advice without even reading the commands! Thanks.
  • Basavaraj Hadimani
    Basavaraj Hadimani almost 5 years
    Good that this answer helped you
  • Richard Tyler Miles
    Richard Tyler Miles over 4 years
    I'm glad I didn't have to reboot this time.