The same project, mysql encounter error when use swoole---Solved!

The same project, tototally the same.

When I start-up with command:
$ composer run --timeout=86400 serve

It works ok, I wanna a single record printed, just like:


pls visit http://139.162.123.197:9502/ for testing.

when I stoped it, and start it up with command:
$ ./vendor/bin/laminas mezzio:swoole:start

It print errors with whoops as follow:

just the test website. http://139.162.123.197:9501/

I wonder whether there are much difference between normal mezzio with mezzio-swoole when using mysql db connection!

Before I started testing the mysql connection in mezzio-swoole, the mezzio-swoole runs well. I think there is no error on swoole itself and the install of mezzio-swoole.

I tested the mysql connection as follow steps:

222

====================================solved==============================
I got to know that the swoole not allow die when runnning!

I know that ReactPHP doesn’t allow die/exit/fatal errors. May be that is the same case with Swoole. It’s just a guess based on what I heard in a ReactPHP video.

The difference is between normal PHP and PHP with Swoole extension.

yes, you are right! When you exit or die in your php code, swoole raise errors!