You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading PHP to 7.3.0 - latest version (and Xdebug to 2.7.0beta1 latest version compatible with PHP 7.3, in case it matters), tinker is no longer working. It launches correctly but I after I input a command it just exits with no error, nothing written to log file and status code 0.
I have a fresh PHP7.3 install (brew install php@7.3) with no xdebug and that very same problem is happening to me as well:
Reacted by Salviano Ludgério, Arren, João Gonçalves, Cedric van Putten, Israel, Chen,Yongze, Jochen Richter, LePev, Ferdinand AMOI, Anderson Couto and 1 more
Update: as discussed below, this is a bug in Homebrew/macOS/PHP/pcntl. It should really be worked around by disabling pcre.jit in your php.ini.
It has something to do with forking / pcntl. I'm trying to sort it out.
In the meantime, you can use PsySH by disabling pcntl support, by adding this to your config file:
// really, don't do this. disable it in php.ini :)return [
'usePcntl' => false,
];
Reacted by Avraham Appel, Rod Elias, Freek Van der Herten, Adriaan, Daniel Portales Rosado, ZZ, Cedric van Putten, Jinxuan Zhu, Wes Roberts, Romans Malinovskis and 54 more
Reacted by Aminul Islam, Aldo Mendez Reyes, Ben, anaxamaxan, Jinyun, Mike Mols, Gary Darling, Prashanth Vijayendra, c0defre4k, yz and 2 more
Reacted by Amine EL G, Prashanth Vijayendra, Anderson Couto, Roman Spiridonov and Saeed Vaziry
Reacted by Jinyun, Anderson Couto and Denis Golubovskiy
Homebrew-installed PHP 7.3.0 on Mojave segfaults when calling preg_match from a child process.
Repro:
<?phpif (preg_match('/./', 'a')) echo"pre-fork works\n";
$pid = pcntl_fork();
if ($pid == -1) {
die('fail');
} elseif ($pid) {
if (preg_match('/./', 'a')) echo"parent works\n";
pcntl_wait($status);
if (pcntl_wifsignaled($status) && pcntl_wtermsig($status) == SIGSEGV) {
die('child process segfaulted');
}
} else {
if (preg_match('/./', 'a')) echo"child works\n";
}
In PHP < 7.3, this results in:
pre-fork works
parent works
child works
But in PHP 7.3, we get:
pre-fork works
parent works
child process segfaulted
I'm not sure what the extent of this issue is. 3v4l.org doesn't have PCNTL so we can't test there. All versions of PHP that Travis tests worked. That said, Travis is testing RC3, so it might be a bug introduced between that and the stable release?
Are y'all on Homebrew + Mojave? Can anyone repro this with other PHP 7.3 versions or sources or operating systems?
Reacted by Jinxuan Zhu, Adriaan, João Gonçalves, Wes Roberts, Miguel Piedrafita, R. Kukuh, wi1dcard, Guixing Bai, FengZi, Aaron Ting and 4 more
I'm using latest macOS 10.14.5, with both pcre and pcre2 installed via Homebrew, with version 8.43, and 10.33, respectively. And php actually uses pcre according to this
Update: as discussed below, this is a bug in Homebrew/macOS/PHP/pcntl. It should really be worked around by disabling pcre.jit in your php.ini.
It has something to do with forking / pcntl. I'm trying to sort it out. In the meantime, you can use PsySH by disabling pcntl support, by adding this to your config file:
Activity
GrahamCampbell commentedon Dec 8, 2018
Does it work after uninstalling xdebug?
GrahamCampbell commentedon Dec 8, 2018
xdebug 2.7.0beta1 is not actually compatible fully with php 7.3 yet. No release or even master of xdebug fully works yet.
dciancu commentedon Dec 8, 2018
@GrahamCampbell It doesn't work with xdebug disabled either
dciancu commentedon Dec 8, 2018
xdebug works very well with php 7.3 from what I have tested, had no issue with it.
GrahamCampbell commentedon Dec 8, 2018
Does it work after full uninstallation of the plugin, not just disabling?
GrahamCampbell commentedon Dec 8, 2018
There are various known issues documented on xdebug's github, including a failing test suite.
dciancu commentedon Dec 8, 2018
@GrahamCampbell not disabled by xdebug.enable, but removed from php.ini I meant
dportalesr commentedon Dec 9, 2018
Apparently Xdebug added support for PHP 7.3 recently
https://bugs.xdebug.org/view.php?id=1519
xdebug/xdebug#430
As @GrahamCampbell mentions there are still a couple of issues in their tracker. Not sure how to generate a report of this problem for them.
chapeupreto commentedon Dec 9, 2018
I have a fresh
PHP7.3install (brew install php@7.3) with no xdebug and that very same problem is happening to me as well:bobthecow commentedon Dec 9, 2018
Update: as discussed below, this is a bug in Homebrew/macOS/PHP/pcntl. It should really be worked around by disabling
pcre.jitin yourphp.ini.It has something to do with forking / pcntl. I'm trying to sort it out.
In the meantime, you can use PsySH by disabling pcntl support, by adding this to your config file:Test #540
bobthecow commentedon Dec 10, 2018
Ok, got it!
Homebrew-installed PHP 7.3.0 on Mojave segfaults when calling
preg_matchfrom a child process.Repro:
In PHP < 7.3, this results in:
But in PHP 7.3, we get:
I'm not sure what the extent of this issue is. 3v4l.org doesn't have PCNTL so we can't test there. All versions of PHP that Travis tests worked. That said, Travis is testing RC3, so it might be a bug introduced between that and the stable release?
Are y'all on Homebrew + Mojave? Can anyone repro this with other PHP 7.3 versions or sources or operating systems?
dportalesr commentedon Dec 10, 2018
Yeah.
chapeupreto commentedon Dec 10, 2018
Just to let you know: same problem with
PHP7.3running onmacOS High Sierra63 remaining items
welenofsky commentedon Jul 9, 2019
I am using the same macOS version (10.14.5) and same PCRE/PCRE2 versions as you listed. Wondering what the difference could be.
bobthecow commentedon Jul 10, 2019
It has been reported on Linux systems as well.
zeshan77 commentedon Oct 2, 2019
It worked for me. Thanks for the workaround!
mk-conn commentedon Oct 30, 2019
Just upgraded to PHP 7.3.11 and psysh is working again
ramsey commentedon Oct 30, 2019
I can confirm the same. I do not need to set
usePcntltofalsewhen running psysh on PHP 7.3.11.driesvints commentedon Oct 30, 2019
Same for me. Seems to be finally fixed 👍
zymawy commentedon Oct 30, 2019
Confirmed ! 🥇
chapeupreto commentedon Oct 30, 2019
All good here (PHP 7.3.11)
welenofsky commentedon Oct 31, 2019
Confirmed here as well!
bobthecow commentedon Dec 1, 2019
Working for me as well.
I'm going to close this, but leave it pinned, so people can find it if they need to.
Bringing back tinker command. If you have trouble running it on Mac O…
Allow using PCRE's just-in-time compilation