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

调用 assemble 方法出现502问题。。。 #134

Closed
codejm opened this issue Nov 7, 2014 · 9 comments
Closed

调用 assemble 方法出现502问题。。。 #134

codejm opened this issue Nov 7, 2014 · 9 comments

Comments

@codejm
Copy link

codejm commented Nov 7, 2014

各位大牛。。小弟遇到这个问题,求助。。
php 5.4.25
nginx 1.6.1
centos 5.9
yaf 2.3.3

@zxcvdavid
Copy link
Contributor

hi, 能把相关的错误log发出来看一下么,有没有core dump发生?

@zxcvdavid
Copy link
Contributor

最好提供一个最小化的触发问题的脚本和core的backtrace信息

@codejm
Copy link
Author

codejm commented Nov 7, 2014

看日志没找到实用的信息
php-fpm:
[08-Nov-2014 01:39:31] WARNING: [pool www] child 15096 exited on signal 11 (SIGSEGV) after 8.284918 seconds from start
[08-Nov-2014 01:39:31] NOTICE: [pool www] child 15102 started

nginx:
2014/11/08 01:39:31 [error] 3332#0: *262 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.32.108, server: xxx.xxxx.com, request: "GET /index/index HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "xxx.xxxx.com"

@codejm
Copy link
Author

codejm commented Nov 7, 2014

我在本机(ubuntu)是没有问题的,到服务器centos才出现的问题

@zxcvdavid
Copy link
Contributor

可以重现的脚本发一下,assemble去掉就不502了么?

@codejm
Copy link
Author

codejm commented Nov 7, 2014

不调用assemble 不会出现502
下面的代码 在我本机没问题,到服务器出现502

        $router = new Yaf_Router();
        $route  = new Yaf_Route_Rewrite(
            "/detail/:id",
            array(
                'controller' => 'index',
                'action' => 'detail',
                'module' => 'kfc'
            )
        );
        $router->addRoute("kfc/index/detail", $route);

        var_dump($router->getRoute('kfc/index/detail')->assemble(
            array(
                ':id' => '1',
            )
        ));exit;

@zxcvdavid
Copy link
Contributor

我已经定位问题 下个版本会fix这个问题 当前版本 你可以通过 给assemble第二个参数传入 array()来解决

@codejm
Copy link
Author

codejm commented Nov 7, 2014

哈哈 已解决~~ 多谢!!

@wenjun1055
Copy link
Contributor

还真有人用assemble啊,我用sprintf来生成。。。

2014-11-07 18:17 GMT+08:00 codejm notifications@github.com:

哈哈 已解决~~ 多谢!!


Reply to this email directly or view it on GitHub
#134 (comment).

zxcvdavid pushed a commit to zxcvdavid/php-yaf that referenced this issue Nov 7, 2014
@laruence laruence closed this as completed Nov 8, 2014
laruence added a commit that referenced this issue Nov 8, 2014
laruence added a commit that referenced this issue Nov 9, 2014
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

4 participants