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

在PHP5.6的环境中报错 #35

Closed
yuslf opened this issue Apr 17, 2019 · 4 comments · Fixed by #37
Closed

在PHP5.6的环境中报错 #35

yuslf opened this issue Apr 17, 2019 · 4 comments · Fixed by #37

Comments

@yuslf
Copy link

yuslf commented Apr 17, 2019

哥们儿,我知道你是中国人,我就不跟你扯英文了。

这个东西在PHP5.6环境中报错了:

PHP Fatal error: Cannot use OpenTracing\SpanContext as SpanContext because the name is already in use in /home/manhong/jeager/vendor/jukylin/jaeger-php/src/Jaeger/Span.php on line 5
PHP Stack trace:
PHP 1. {main}() /home/manhong/jeager/index.php:0
PHP 2. Jaeger\Jaeger->startSpan() /home/manhong/jeager/index.php:14
PHP 3. spl_autoload_call() /home/manhong/jeager/index.php:112
PHP 4. Composer\Autoload\ClassLoader->loadClass() /home/manhong/jeager/index.php:112
PHP 5. Composer\Autoload\includeFile() /home/manhong/jeager/vendor/composer/ClassLoader.php:322

Fatal error: Cannot use OpenTracing\SpanContext as SpanContext because the name is already in use in /home/manhong/jeager/vendor/jukylin/jaeger-php/src/Jaeger/Span.php on line 5

Call Stack:
0.0001 231896 1. {main}() /home/manhong/jeager/index.php:0
0.0030 786432 2. Jaeger\Jaeger->startSpan() /home/manhong/jeager/index.php:14
0.0032 822760 3. spl_autoload_call() /home/manhong/jeager/index.php:112
0.0032 822800 4. Composer\Autoload\ClassLoader->loadClass() /home/manhong/jeager/index.php:112
0.0032 822944 5. Composer\Autoload\includeFile() /home/manhong/jeager/vendor/composer/ClassLoader.php:322

只要注释掉 “vendor/jukylin/jaeger-php/src/Jaeger/Span.php” 文件中的 “use OpenTracing\SpanContext;“ 这一行就可以了。

我是用composer安装的,安装步骤如下:
composer require opentracing/opentracing 1.0.0-beta2
composer require jukylin/jaeger-php v2.0.5-beta

@jukylin
Copy link
Owner

jukylin commented Apr 18, 2019

你好,你们公司在用php 5.6 吗?

@jukylin
Copy link
Owner

jukylin commented Apr 18, 2019

我在mac 使用brew 安装不了5.6 ,所以验证不了这个问题。我现在打算不兼容5.6了。

@yuslf
Copy link
Author

yuslf commented Apr 22, 2019

唉~小公司,资源有限,没办法。我自己再想想办法吧......

@linuxmyjob
Copy link

您好,您能留下一个沟通方式吗,我想和您沟通下pinpoint agent 问题

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

Successfully merging a pull request may close this issue.

3 participants