首页
下载
文档
问答社区
视频
捐赠
源代码
AI 助理
赞助商
CRMEB
Apipost
腾讯云
微擎
禅道
51Talk
商业产品
Swoole AI 智能文档翻译器
Swoole-Compiler PHP 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
php7 下 swoole2.02 执行swoole_mysql->query 报错
$db = new swoole_mysql; $server = array( 'host' => 'localhost', 'user' => 'test', 'password' => 'test', 'database' => 'test', ); $db->connect($server, function ($db, $r) { if ($r === false) { var_dump($db->connect_errno, $db->connect_error); die; } $sql = 'select * from test'; //$sql = 'show tables'; $db->query($sql, function(swoole_mysql $db, $r) { global $s; if ($r === false) { var_dump($db->error, $db->errno); } elseif ($r === true ) { var_dump($db->affected_rows, $db->insert_id); } var_dump($r); $db->close(); }); }); sql执行 $sql = 'show tables'; 没问题 执行查询就出错 $sql = 'select * from test'; 返回 Segmentation fault 这个什么情况? Program received signal SIGSEGV, Segmentation fault. mysql_decode_field (client=0x7ffff1886380) at /usr/local/src/swoole-src-2.0.2-alpha/swoole_mysql.h:419 419 col->db[size] = '\0'; Missing separate debuginfos, use: debuginfo-install cyrus-sasl-lib-2.1.23-13.el6.x86_64 freetype-2.3.11-17.el6.x86_64 glibc-2.12-1.149.el6_6.5.x86_64 keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-33.el6.x86_64 libcom_err-1.41.12-21.el6.x86_64 libcurl-7.19.7-52.el6.x86_64 libgcrypt-1.4.5-12.el6_8.x86_64 libgpg-error-1.7-4.el6.x86_64 libidn-1.18-2.el6.x86_64 libjpeg-turbo-1.2.1-3.el6_5.x86_64 libmcrypt-2.5.8-9.el6.x86_64 libpng-1.2.49-1.el6_2.x86_64 libselinux-2.0.94-5.8.el6.x86_64 libssh2-1.4.2-1.el6_6.1.x86_64 libxml2-2.7.6-21.el6_8.1.x86_64 libxslt-1.1.26-2.el6_3.1.x86_64 nspr-4.11.0-1.el6.x86_64 nss-3.21.3-2.el6_8.x86_64 nss-softokn-freebl-3.14.3-23.3.el6_8.x86_64 nss-util-3.21.3-1.el6_8.x86_64 openldap-2.4.23-26.el6.x86_64 openssl-1.0.1e-30.el6_6.5.x86_64 postgresql-libs-8.4.20-6.el6.x86_64 zlib-1.2.3-29.el6.x86_64 (gdb)
发布于6年前 · 0 次浏览 · 来自
提问
天
天之丛云
$db = new swoole_mysql; $server = array( 'host' => 'localhost', 'user' => 'test', 'password' => 'test', 'database' => 'test', ); $db->connect($server, function ($db, $r) { if ($r === false) { var_dump($db->connect_errno, $db->connect_error); die; } $sql = 'select * from test'; //$sql = 'show tables'; $db->query($sql, function(swoole_mysql $db, $r) { global $s; if ($r === false) { var_dump($db->error, $db->errno); } elseif ($r === true ) { var_dump($db->affected_rows, $db->insert_id); } var_dump($r); $db->close(); }); }); sql执行 $sql = 'show tables'; 没问题 执行查询就出错 $sql = 'select * from test'; 返回 Segmentation fault 这个什么情况? Program received signal SIGSEGV, Segmentation fault. mysql_decode_field (client=0x7ffff1886380) at /usr/local/src/swoole-src-2.0.2-alpha/swoole_mysql.h:419 419 col->db[size] = '\0'; Missing separate debuginfos, use: debuginfo-install cyrus-sasl-lib-2.1.23-13.el6.x86_64 freetype-2.3.11-17.el6.x86_64 glibc-2.12-1.149.el6_6.5.x86_64 keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-33.el6.x86_64 libcom_err-1.41.12-21.el6.x86_64 libcurl-7.19.7-52.el6.x86_64 libgcrypt-1.4.5-12.el6_8.x86_64 libgpg-error-1.7-4.el6.x86_64 libidn-1.18-2.el6.x86_64 libjpeg-turbo-1.2.1-3.el6_5.x86_64 libmcrypt-2.5.8-9.el6.x86_64 libpng-1.2.49-1.el6_2.x86_64 libselinux-2.0.94-5.8.el6.x86_64 libssh2-1.4.2-1.el6_6.1.x86_64 libxml2-2.7.6-21.el6_8.1.x86_64 libxslt-1.1.26-2.el6_3.1.x86_64 nspr-4.11.0-1.el6.x86_64 nss-3.21.3-2.el6_8.x86_64 nss-softokn-freebl-3.14.3-23.3.el6_8.x86_64 nss-util-3.21.3-1.el6_8.x86_64 openldap-2.4.23-26.el6.x86_64 openssl-1.0.1e-30.el6_6.5.x86_64 postgresql-libs-8.4.20-6.el6.x86_64 zlib-1.2.3-29.el6.x86_64 (gdb)
赞
0
分享
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
评论
2018-04-12
◢
◢◤
最新的版本已修复。
赞
0
回复
微信公众号
热门内容
暂无回复的问答
- CodeGalaxy K3s 轻量集群节点之间如何实现负载均衡
- 关于openssl CURL WARNING swSSL_connect: SSL_connect(fd=69) failed. Error: error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small[1|394]
- 多个模型如何进行事务异常回退?
- websocket开启wss报错
- 协程tcp服务器如何使用多进程?recv()方法接收信息,打印出来的pid一直是同一个。没用使用到多进程啊。