【 在 atppp (Big Mouse) 的大作中提到: 】
: 标 题: Re: 新装的bbs程序,用老数据,没法登录了
: 发信站: 水木社区 (Mon Dec 19 18:01:37 2005), 转信
:
:
: 【 在 diarytea (相信且只相信一见钟情 日记茶) 的大作中提到: 】
: : 老站的site.h里面,HAVE_USERMONEY未定义,HAVE_WFORUM是0
: : 新站用的最新的CVS代码,拷贝老站的site.h过来后,
: : 在最后一个#endif之前加上OWN_USEREC的定义,以及从老的struct.h中复制过来userec的定义.加的代码附后.
: : 编译安装没问题,没有 make install-home
: : 从旧站拷来数据,放到对应的地方.起bbs,所有用户都显示是不正确的用户帐号.
: 这里你确定起bbs之前共享内存没东西?可以用root执行ipcs来确认。
起之前执行过
ipcs -m | awk '$0~/bbs/ {system(sprintf("ipcrm shm %s",$2));}'
: : 如果make install-home后再复制旧站数据
: : 那么guest可以登录,看到版面,精华区等都成功转移了.
: : 部分用户包括SYSOP可以输入密码,然后显示系统错误或封禁登录.
: : 部分用户还是不正确的帐号.
: 还是部分用户正确?正确的帐号有规律么...
没啥规律..
但是存在的用户,用guest看他的信息,上站次数,生命力,文章数等等都是错的
会不会是cpu存数据格式不一样的问题
老站是 TI UltraSparc II (BlackBird)
新站是 Intel(R) Celeron(R) CPU 2.66GHz
我不太清楚sparc是什么样的
: : 老站上和新站上sizeof(struct userec)都是176
: 这个是如何确认的?
比如在lazybm.c的main()最开头加个 printf("%d",sizeof(struct userec));
: 另是否开了ipv6
内核有这个...ifconfig也能看到,但是其他没配置过了
: 另error log是否看过有有用的信息
: 另...好奇怪啊,我暂时也不知道了
: : 问题出在哪呢
: : #define OWN_USEREC 1
: : #ifdef HAVE_IPV6_SMTH
: : #define IPLEN 46 /* Length of most string data */
: : #else
: : #define IPLEN 16
: : #endif
: : /* old userec structure */
: : struct userec {
: : /* Structure used to hold information in */
: : char userid[ IDLEN + 2]; /* PASSFILE */
: : char flags; /*一些标志,戒网,版面排序之类的*/
: : unsigned char title; /*用户级别*/
: : time_t firstlogin;
: : char lasthost[ IPLEN];
: : unsigned int numlogins;
: : unsigned int numposts;
: : #ifdef CONV_PASS
: : char passwd[ OLDPASSLEN];
: : char unused_padding[ 2];
: : #endif
: : char username[ NAMELEN];
: : unsigned int club_read_rights[ MAXCLUB>>5];
: : unsigned int club_write_rights[ MAXCLUB>>5];
: : unsigned char md5passwd[ MD5PASSLEN];
: : #ifndef OS_64BIT
: : unsigned int userlevel;
: : #endif
: : time_t lastlogin;
: : time_t stay;
: : #ifdef OS_64BIT /* align 8 bytes... */
: : unsigned int userlevel;
: : #endif
: : int signature;
: : unsigned int userdefine[ 2];
: : time_t notedate;
: : int noteline;
: : int notemode;
: : time_t exittime;
: : /* 生日数据转移到 userdata 结构中 */
: : unsigned int usedspace; /* used space of user's mailbox, in bytes */
: : #ifdef HAVE_USERMONEY
: : int money;
: : int score;
: : char unused[ 20];
: : #endif
: : };
:
:
: --
: ╭︿︿︿╮╭︿︿︿╮╭︿︿︿╮╭︿︿︿╮╭︿︿︿╮
: {/-◎◎-\}{/-◎◎-\}{/-◎◎-\}{/-◎◎-\}{/-◎◎-\}
: ( (oo) ) ( (oo) ) ( (oo) ) ( (oo) ) ( (oo) )
: ︶ ︶ ︶ ︶ ︶
:
:
: ※ 来源:·水木社区 newsmth.net·[FROM: 61.182.213.*]
--
FROM 211.151.90.*