Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.x 版本启动后报错 #63

Closed
jormin opened this issue Oct 21, 2018 · 1 comment
Closed

3.x 版本启动后报错 #63

jormin opened this issue Oct 21, 2018 · 1 comment

Comments

@jormin
Copy link

jormin commented Oct 21, 2018

经测试,3.6.2 版本启动时报错,错误如下:

root@22be1eecd514:/www/bin# php start_swoole_server.php start

Warning: Illegal string offset 'config_version' in /www/vendor/hassankhan/config/src/Parser/Php.php(37) : eval()'d code on line 8

Fatal error: Uncaught Noodlehaus\Exception\UnsupportedFormatException: PHP string does not return an array in /www/vendor/hassankhan/config/src/Parser/Php.php:54
Stack trace:
#0 /www/vendor/hassankhan/config/src/Config.php(97): Noodlehaus\Parser\Php->parse('3/**\n * Created...')
#1 /www/vendor/hassankhan/config/src/Config.php(62): Noodlehaus\Config->loadFromFile('/www/bin/../src...', Object(Noodlehaus\Parser\Php))
#2 /www/vendor/tmtbe/swooledistributed/src/Server/Console/ChannelCmd.php(31): Noodlehaus\Config->__construct('/www/bin/../src...')
#3 /www/vendor/tmtbe/swooledistributed/src/Server/Start.php(124): Server\Console\ChannelCmd->__construct('ChannelCmd')
#4 /www/vendor/tmtbe/swooledistributed/src/Server/Start.php(102): Server\Start::addDirCommand('/www/bin/../ven...', 'Server', Object(Symfony\Component\Console\Application))
#5 /www/bin/start_swoole_server.php(11): Server\Start::run()
#6 {main}
  thrown in /www/vendor/hassankhan/config/src/Parser/Php.php on line 54
@jormin
Copy link
Author

jormin commented Oct 21, 2018

测试应该是 hassankhan/config 扩展的问题,这个库的作者最近发布了 2.0.0 版本,这个版本会造成上面说的配置异常问题,经测试更改为 1.1.0 后启动就正常了。

composer 配置如下:

{
  "require": {
    "tmtbe/swooledistributed":">3.2.6",
    "hassankhan/config":"1.1.0"
  },
 "autoload": {
    "psr-4": {
      "app\\": "src/app",
      "test\\": "src/test"
    }
  }
}

@jormin jormin closed this as completed Oct 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant