Details
这个swoft的框架用着都好的,学得也差不多了,也正在试着用它写项目。
因操作失误,在项目目录来了一下composer update 这下好了。再运行swoft的时候,要求swoole版本必须大于4.4.1,本来是4.3.5,然后升级了swoole到4.4.2。
本想着这下好了吧,结果再次 php ./bin/sowft http:start的时候,出现了如下问题:
context information has been lost of the coID:-1;
详细的error:
PHP Fatal error: Uncaught TypeError: Return value of context() must implement interface Swoft\Contract\ContextInterface, null returned in /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/framework/src/Helper/Functions.php:151
Stack trace:
3 /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/log/src/Helper/Log.php(118): Monolog\Logger->error('Pool error is C...')
4 /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/error/src/DefaultExceptionHandler.php(29): Swoft\Log\Helper\Log::error('Pool error is C...')
5 /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/error/src/DefaultErrorDispatcher.php(94): Swoft\Error\DefaultExceptionHandler->handle(Object(Swoft\Db\Exception\D in /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/framework/src/Helper/Functions.php on line 151
PHP Fatal error: Uncaught ErrorException: Uncaught TypeError: Return value of context() must implement interface Swoft\Contract\ContextInterface, null returned in /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/framework/src/Helper/Functions.php:151
Stack trace:
3 /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/log/src/Helper/Log.php(118): Monolog\Logger->error('Pool error is C...')
4 /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/error/src/DefaultExceptionHandler.php(29): Swoft\Log\Helper\Log::error('Pool error is C...')
5 /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/error/src/DefaultErrorDispatcher.php(94): Swoft\Error\DefaultExceptionHandler->handle(Ob in /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/framework/src/Helper/Functions.php on line 151
php --ri swoole
)php -v
)Details 这个swoft的框架用着都好的,学得也差不多了,也正在试着用它写项目。 因操作失误,在项目目录来了一下composer update 这下好了。再运行swoft的时候,要求swoole版本必须大于4.4.1,本来是4.3.5,然后升级了swoole到4.4.2。 本想着这下好了吧,结果再次 php ./bin/sowft http:start的时候,出现了如下问题: context information has been lost of the coID:-1; 详细的error: PHP Fatal error: Uncaught TypeError: Return value of context() must implement interface Swoft\Contract\ContextInterface, null returned in /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/framework/src/Helper/Functions.php:151 Stack trace:
0 /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/log/src/Logger.php(231): context()
1 /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/log/src/Logger.php(185): Swoft\Log\Logger->formatRecord('trace[DefaultEx...', Array, 400, 'error', Object(DateTime), Array)
2 /mnt/hgfs/e-swoole/zoodt.com/vendor/monolog/monolog/src/Monolog/Logger.php(707): Swoft\Log\Logger->addRecord(400, 'trace[DefaultEx...', Array)
3 /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/log/src/Helper/Log.php(118): Monolog\Logger->error('Pool error is C...')
4 /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/error/src/DefaultExceptionHandler.php(29): Swoft\Log\Helper\Log::error('Pool error is C...')
5 /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/error/src/DefaultErrorDispatcher.php(94): Swoft\Error\DefaultExceptionHandler->handle(Object(Swoft\Db\Exception\D in /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/framework/src/Helper/Functions.php on line 151
PHP Fatal error: Uncaught ErrorException: Uncaught TypeError: Return value of context() must implement interface Swoft\Contract\ContextInterface, null returned in /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/framework/src/Helper/Functions.php:151 Stack trace:
0 /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/log/src/Logger.php(231): context()
1 /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/log/src/Logger.php(185): Swoft\Log\Logger->formatRecord('trace[DefaultEx...', Array, 400, 'error', Object(DateTime), Array)
2 /mnt/hgfs/e-swoole/zoodt.com/vendor/monolog/monolog/src/Monolog/Logger.php(707): Swoft\Log\Logger->addRecord(400, 'trace[DefaultEx...', Array)
3 /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/log/src/Helper/Log.php(118): Monolog\Logger->error('Pool error is C...')
4 /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/error/src/DefaultExceptionHandler.php(29): Swoft\Log\Helper\Log::error('Pool error is C...')
5 /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/error/src/DefaultErrorDispatcher.php(94): Swoft\Error\DefaultExceptionHandler->handle(Ob in /mnt/hgfs/e-swoole/zoodt.com/vendor/swoft/framework/src/Helper/Functions.php on line 151
实在搞不懂了,试着把swoft退回到以前,还是不行。本人新手,好多地方都不太懂。就上面这个问题,找了半天也不知道是怎么回事