华飞户外

 找回密码
 立即注册

搜索
热搜: 活动 交友 discuz
查看: 2960|回复: 0
打印 上一主题 下一主题

QQ互联登陆出错的问题解决方法

[复制链接]

该用户从未签到

参加活动:0

组织活动:0

工分
0 元

工分
0 元
扫一扫,手机访问本帖
跳转到指定楼层
楼主
发表于 2014-7-13 10:37:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
一键分享 一键分享
本帖最后由 zzhtts 于 2014-7-23 16:55 编辑

其实这个问题x3.1发布当天我就测试了新版本的,就发现了这个问题,其实这只是个小问题而已,所以官方在让我们找bug嘛。
其实这个问题就是数据表里少了一个字段。
看下错误代码:

(1054) Unknown column 'conuintoken' in 'field list
UPDATE common_member_connect SET `conuintoken`='4866612C1C0E76EF744AD92AB5F7F059' , `conopenid`='6114C6C27E15656939C3ABBEE70E6E37' , `conisfeed`='1' WHERE `uid`='1'

在你用QQ登陆的时候是把你的账号信息写入数据表common_member_connect中的,而这个语句中有conuintoken这个字段,但数据表common_member_connect里面却没有,所以报错,这可能是dz的童鞋们小小的疏忽。

*********************************好了,我们现在就来解决吧******************************
其实说了上面的,只要稍微懂数据库操作的童鞋应该都会了,其实如果懂数据库的看下报错就知道哪里出问题了。但是用dz的很多童鞋自以为知道很多,其实技术一窍不通,那么我就一口一口来喂吧。方法一:后台运行SQL
1、修改config/config_global.php文件查找下面代码把0改为1,开启后台直接运行SQL
  • $_config['admincp']['runquery'] = '0';

复制代码
2、在后台后台——站长——数据库——升级,粘贴以下代码提交:
  • alter table  pre_common_member_connect add   conuintoken  char(32) not null;
  • alter table pre_common_connect_guest add   conuintoken  char(32) not null;

复制代码
--如果数据表前缀不是默认的pre,请改为相应的表前缀


方法二:数据库里边修改(不想碰数据库无视这个)
大家用mysql管理工具(其实大家基本上用PMA,其他可能都没听过,呵呵)。找到你的数据库,找到表common_member_connect
查看表信息是:
ield             Type                   Collation       Null    Key     Default  Extra   Privileges                       Comment  
----------------  ---------------------  --------------  ------  ------  -------  ------  -------------------------------  ---------
uid               mediumint(8) unsigned  (NULL)          NO      PRI     0                select,insert,update,references           
conuin            char(40)               gbk_chinese_ci  NO      MUL                      select,insert,update,references           
conuinsecret      char(16)               gbk_chinese_ci  NO                               select,insert,update,references           
conopenid         char(32)               gbk_chinese_ci  NO      MUL                      select,insert,update,references           
conisfeed         tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conispublishfeed  tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conispublisht     tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conisregister     tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conisqzoneavatar  tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conisqqshow       tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references  
看看上面的字段是不是少了conuintoken?
那么我们加上conuintoken吧,sql语句为
  • alter table pre_common_member_connect add conuintoken char(32) not null;

复制代码
执行上面的sql语句即可,如果是在全局执行,请加上数据库名,比如数据库名为db,则pre_common_member_connect应为db.pre_common_member_connect
下面再看下表信息:
Field             Type                   Collation                   Null    Key     Default  Extra   Privileges                       Comment  
----------------  ---------------------  --------------         ------  ------  -------  ------  -------------------------------  ---------
uid               mediumint(8) unsigned  (NULL)          NO      PRI     0                select,insert,update,references           
conuin            char(40)               gbk_chinese_ci     NO      MUL                      select,insert,update,references           
conuinsecret      char(16)               gbk_chinese_ci  NO                               select,insert,update,references           
conopenid         char(32)               gbk_chinese_ci  NO      MUL                      select,insert,update,references           
conisfeed         tinyint(1) unsigned    (NULL)             NO              0                select,insert,update,references           
conispublishfeed  tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conispublisht     tinyint(1) unsigned    (NULL)            NO              0                select,insert,update,references           
conisregister     tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conisqzoneavatar  tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conisqqshow       tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conuintoken      char(32)             gbk_chinese_ci        NO            (NULL)           select,insert,update,references   
最后红色部分就是我们那天sql语句执行增加的,当然也可以直接用数据库操作工具添加,不用写sql,但这个sql很简单。
请关注本站公众号:T13732320632

打赏列表共打赏了0次

cry
还木有人打赏~
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

载入中

QQ|联系我们|关于我们|QQ在线|Archiver|手机版|小黑屋|华飞社区 ( 浙ICP备08013098号-1  

GMT+8, 2024-9-22 21:49 , Processed in 0.187500 second(s), 47 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表