composer: preg_match(): JIT compilation failed: no more memory
When I run this command:
composer create-project symfony/website-skeleton my-project
I get the following output:
PHP Warning: preg_match_all(): JIT compilation failed: no more memory in phar:///usr/local/Cellar/composer/1.8.0/bin/composer/vendor/symfony/console/Formatter/OutputFormatter.php on line 137
Warning: preg_match_all(): JIT compilation failed: no more memory in phar:///usr/local/Cellar/composer/1.8.0/bin/composer/vendor/symfony/console/Formatter/OutputFormatter.php on line 137
PHP Warning: preg_match(): JIT compilation failed: no more memory in phar:///usr/local/Cellar/composer/1.8.0/bin/composer/vendor/symfony/console/Application.php on line 755
Warning: preg_match(): JIT compilation failed: no more memory in phar:///usr/local/Cellar/composer/1.8.0/bin/composer/vendor/symfony/console/Application.php on line 755
PHP Warning: preg_match(): JIT compilation failed: no more memory in phar:///usr/local/Cellar/composer/1.8.0/bin/composer/vendor/symfony/console/Application.php on line 759
Warning: preg_match(): JIT compilation failed: no more memory in phar:///usr/local/Cellar/composer/1.8.0/bin/composer/vendor/symfony/console/Application.php on line 759
PHP Warning: preg_split(): JIT compilation failed: no more memory in phar:///usr/local/Cellar/composer/1.8.0/bin/composer/vendor/symfony/console/Application.php on line 654
Warning: preg_split(): JIT compilation failed: no more memory in phar:///usr/local/Cellar/composer/1.8.0/bin/composer/vendor/symfony/console/Application.php on line 654
PHP Warning: preg_split(): JIT compilation failed: no more memory in phar:///usr/local/Cellar/composer/1.8.0/bin/composer/vendor/symfony/console/Application.php on line 1091
Warning: preg_split(): JIT compilation failed: no more memory in phar:///usr/local/Cellar/composer/1.8.0/bin/composer/vendor/symfony/console/Application.php on line 1091
PHP Warning: preg_replace(): JIT compilation failed: no more memory in phar:///usr/local/Cellar/composer/1.8.0/bin/composer/vendor/symfony/console/Formatter/OutputFormatter.php on line 36
Warning: preg_replace(): JIT compilation failed: no more memory in phar:///usr/local/Cellar/composer/1.8.0/bin/composer/vendor/symfony/console/Formatter/OutputFormatter.php on line 36
[ErrorException]
preg_match(): JIT compilation failed: no more memory
PHP Warning: preg_match_all(): JIT compilation failed: no more memory in phar:///usr/local/Cellar/composer/1.8.0/bin/composer/vendor/symfony/console/Formatter/OutputFormatter.php on line 199
Warning: preg_match_all(): JIT compilation failed: no more memory in phar:///usr/local/Cellar/composer/1.8.0/bin/composer/vendor/symfony/console/Formatter/OutputFormatter.php on line 199
I have PHP 7.3 and Composer 1.8
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 9
- Comments: 25 (4 by maintainers)
Commits related to this issue
- fix: php 7.3 on CI for OSX See: https://github.com/composer/composer/issues/7836 [changelog skip] — committed to williamdes/mariadb-mysql-kbs by williamdes 5 years ago
- fix: php 7.3 on CI for OSX See: https://github.com/composer/composer/issues/7836 [changelog skip] — committed to williamdes/mariadb-mysql-kbs by williamdes 5 years ago
In my case, it works by specifying
pcre.jit=0in php.inibe carefull with typos 😉 should be
pcre.jit = 0If
pcre.jit = 0pcre.jit=0pcre.jit = Offin php.ini, not worked, try this:https://stackoverflow.com/a/53703630/9142922
I solved this by disabling the PCRE jit compilation. 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:
It looks like you set jit=0 in the php.ini of your webserver. Make sure to have it configured in the php.ini used inside the cli. Usually these are 2 different files
great point @staabm!!! forgot they are different.
ran
php --iniand added my config to the additionals folder.I have the same problem on my Mac. Here are my versions:
PHP 7.3.0 Composer 1.8.0 MacOS High Sierra 10.13.6
Setting
pcre.jit = 0worked for me but it should be working without it, or maybe indicated in composer documentation, so I’d say maybe we should keep this issue opened, is that OK for you @HoTKreeZy?I’ll try upgrading my Mac later to see if everything is better afterwards.
pcre.jit = 0worked fine for me 👍 thankssWell… I just upgraded my mac to Mojave and tried again and it’s working now… So I can’t tell if your answer works but it will probably help someone else 😃 Thank you anyway, i’ll keep it aside 😃
Verify that you really have it set:
It work for me by follow steps:
pcre.jit = 0in php.ini, worked fine for me olso 👍 thanks !if there is a line already exist like
;pcre.jit=0remove the semicolon;before the line. The line should look likepcre.jit=0guys am still getting the same error i diid add this pcre.jit=0
FYI - This also helped to correct (Thanks to @NickWilde1990 for the pointer!)
with