DiscuxX3.4成功升级到X3.5经验分享
<font style="font-size:16.0pt">DiscuxX3.4</font><font style="font-size:16.0pt">成功升级到X3.5经验分享</font><font style="font-size:16.0pt">从今年2月开始升级DiscuzX3.4,到现在出现过多次错误,大版本的升级,难度比较大,由discuz2.5到discuzX3.5,这次升级是最难的一次。</font><font style="font-size:16.0pt">一、我的环境:</font><font color="#333333"><font face="system-ui, -apple-system, BlinkMacSystemFont, sans-serif"><font size="5">Apache/2.4.6 (CentOS) PHP/7.4.33 /mysql 5.742</font></font></font><font style="font-size:16.0pt">二、准备工具:1、下载最新的discuzx3.5完整版,下载升级程序2个文件。https://www.dismall.com/thread-14660-1-1.html</font><font style="font-size:16.0pt">2</font><font style="font-size:16.0pt">、数据库工具,phpmyadmin。</font><font style="font-size:16.0pt">3</font><font style="font-size:16.0pt">、数据库重建两个文件。论坛的数据库表install.sql,在下载dZx3.5完整安装包中Upload\install\data\install.sql。ucenter数据库表uc.sql。在下载完整安装包中Upload\uc_server\install\uc.sql。</font><font style="font-size:16.0pt">4</font><font style="font-size:16.0pt">、tools工具箱。</font><font style="font-size:16.0pt">三、升级前准备</font><font style="font-size:16.0pt">1</font><font style="font-size:16.0pt">,进入dzX3.4后台插件,卸载所有插件,包括QQ互联,我的马甲,微信登录等(升级成功后可以重新安装)。站长---数据库,进行数据库校验,修复数据缺少的表和字段。把新增字段的数据表用phpmyadmin工具在相应的数据 表中删除(注意不要删错了,此处有一定的风险)。修复数据库与使数据库纯净,会减少升级中错误机会。</font><font style="font-size:16.0pt">2</font><font style="font-size:16.0pt">、在后台站长--数据库-备份论坛所有数据。备份论坛安装文件。如原来的论坛文件夹为BBS,备份后为BBS1。备份数据库文件所有文件夹。如ultrax备份后为ultrax1。</font><font style="font-size:16.0pt">3</font><font style="font-size:16.0pt">、先用bbs1文件夹与数据库文件夹ultrax1试试有没有什么问题如果出现错误,删掉数据库文件夹如ultrax1,,重新复制原来的数据库文件夹命名为ultrax2,不要用ultrax1,减少出错机会。注意要修改3个配置文件。以dzx3.4论坛文件夹BBS1为例。</font><font style="font-size:16.0pt">1</font><font style="font-size:16.0pt">、bbs1/uc_server/data/config.inc.php(ucenter配置文件)</font><font style="font-size:16.0pt">2</font><font style="font-size:16.0pt">、bbs1/config/config_global.php(论坛全局配置文件)</font><font style="font-size:16.0pt">$_config['db']['dbuser'] = '###';</font><font style="font-size:16.0pt">(改为数据 库的用户名)</font><font style="font-size:16.0pt">$_config['db']['dbpw'] = '*****';</font><font style="font-size:16.0pt">(数据 库密码)</font><font style="font-size:16.0pt">$_config['db']['dbname'] = '<u>ultrax1</u>';</font><font style="font-size:16.0pt">与config_ucenter.php(论坛与ucenter配置文件)。</font><font style="font-size:16.0pt">define('UC_DBPW', '****');</font><font style="font-size:16.0pt">define('UC_DBNAME', '<i><u>ultrax1</u></i><u>');</u></font><font style="font-size:16.0pt">define('UC_DBTABLEPRE','<u>`ultrax1</u>`.pre_ucenter_');</font><font style="font-size:16.0pt">这一步非常重要,数据 库名称不正确,就会报数据库错误或数据 库未连接。</font><font style="font-size:16.0pt">四,升级过程</font><font style="font-size:16.0pt">1</font><font style="font-size:16.0pt">、按照官网上升级程序,先升级ucenter,按官网升级说明,把安装包中的uc_server与uc_client两个文件夹复制到论坛文件夹BBS1中,选择替换。</font><font style="font-size:16.0pt">2</font><font style="font-size:16.0pt">、复制升级ucenter文件update_ucenter_adult.php到bbs1/uc_server/install/中,然后执行升级程序。</font><font style="font-size:16.0pt">http://论坛网址/bbs1/uc_server/install/update_ucenter_adult.php</font><font style="font-size:16.0pt">升级顺利会出现一个错误,升级Ucenter 7.0时显示数据库members表里缺少email这个字段</font><font style="font-size:16.0pt">:标准Ucenter必定存在email字段的,此提示一般是以前某些修改导致email字段不存在或未被设置为索引,进入数据表(使用PhpMyAdmin找到pre_ucenter_members表点结构就看到email字段选中,在更多里找到为索引点击一下就行了,然后刷新再升级。直到出现升级成功。</font><font style="font-size:16.0pt">3</font><font style="font-size:16.0pt">、如果升级过程出现数据表错误,可在选择重建数据表。打开ucenter数据库重建表文件uc.sql,查找出现错误表的地方,比如:members表出错。复制下面执行语句。</font><font style="font-size:16.0pt">DROP TABLE IF EXISTS uc_members;</font><font style="font-size:16.0pt">CREATE TABLE uc_members (</font><font style="font-size:16.0pt"> uidmediumint(8) unsigned NOT NULL AUTO_INCREMENT,</font><font style="font-size:16.0pt"> usernamechar(15) NOT NULL DEFAULT '',</font><font style="font-size:16.0pt"> `password`varchar(255) NOT NULL DEFAULT '',</font><font style="font-size:16.0pt"> `secmobicc`varchar(3) NOT NULL DEFAULT '',</font><font style="font-size:16.0pt"> `secmobile`varchar(12) NOT NULL DEFAULT '',</font><font style="font-size:16.0pt"> emailvarchar(255) NOT NULL DEFAULT '',</font><font style="font-size:16.0pt"> myidchar(30) NOT NULL DEFAULT '',</font><font style="font-size:16.0pt"> myidkeychar(16) NOT NULL DEFAULT '',</font><font style="font-size:16.0pt"> regipvarchar(45) NOT NULL DEFAULT '',</font><font style="font-size:16.0pt"> regdateint(10) unsigned NOT NULL DEFAULT '0',</font><font style="font-size:16.0pt"> lastloginipint(10) NOT NULL DEFAULT '0',</font><font style="font-size:16.0pt"> lastlogintimeint(10) unsigned NOT NULL DEFAULT '0',</font><font style="font-size:16.0pt"> saltvarchar(20) NOT NULL DEFAULT '',</font><font style="font-size:16.0pt"> secqueschar(8) NOT NULL default '',</font><font style="font-size:16.0pt"> PRIMARYKEY(uid),</font><font style="font-size:16.0pt"> UNIQUE KEYusername(username),</font><font style="font-size:16.0pt"> KEYemail(email(40)),</font><font style="font-size:16.0pt"> KEY secmobile(`secmobile`, `secmobicc`)</font><font style="font-size:16.0pt">) ENGINE=InnoDB;</font><font style="font-size:16.0pt">进入phpmyadmin中,选择ultrax1数据库,点左边sql用CTRL+V粘贴,然后点执行。重建成功后,刷新升级程序。</font><font style="font-size:16.0pt">4</font><font style="font-size:16.0pt">、如果发现重新不能继续,可删除数据库文件夹ultrax1,重新复制DZx3.4数据 库文件夹重命名为ultrax2,注意修改3个配置文件的数据库(看三,3项,加下载线的部分)</font><font style="font-size:16.0pt">5</font><font style="font-size:16.0pt">、ucneter升级到1.7后,就可以升级论坛到x3.5,按官网要求,复制DX3.5文件到论坛文件夹bbs1中,(保留data, config 和 uc_server与uc_client,其他可以删除),复制升级程序 update_adult.php 上传bbs1 所在目录下 install 目录,并删除 Discuz! 所在目录下 data 目录的 update.lock 文件。</font><font style="font-size:16.0pt">然后执行升级。论坛网址</font><font style="font-size:16pt">/install/update_adult.php</font><font style="font-size:16pt">。直到出现升级成功。</font><font style="font-size:16pt">6</font><font style="font-size:16pt">、升级过程如果出现某个表错误。可以用重建该表。</font><font style="font-size:16pt"> </font><font style="font-size:16.0pt">打开数据库重建表文件install.sql。查找出现错误表的地方,复制相应执行语句,到phpmyadmin中sql去执行。</font><font style="font-size:16.0pt">7</font><font style="font-size:16.0pt">、升级成功后,出现论坛关闭,管理员无法登录。论坛关闭可以用tools工具箱来打开。但管理员登录一起提示登录失败。并且登录时不出现验证码。</font><font style="font-size:16.0pt">成功升级到DZx3.5管理员登录 失败,解决方法:</font><font style="font-size:16.0pt">1</font><font style="font-size:16.0pt">,按照官网上全新安装 DZx3.5方法,安装成功后,复制3个配置文件到BBS1,注意修改三个配置文件,尤其是数据名称和'UC_DBNAME', '<u>ultrax1'</u>);</font><font style="font-size:16.0pt">define('UC_DBTABLEPRE', '<u>`ultrax1`</u>.pre_ucenter_');</font><font style="font-size:16.0pt">经验之谈,希望大家在升级的路上顺利,祝大家升级成功。如有错误的地方请指正。</font><br />升级 学习学习<br />谢谢分享<img id="aimg_P3j8J" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="https://cdn.jsdelivr.net/gh/master-of-forums/master-of-forums/public/images/patch.gif" onmouseover="img_onmouseoverfunc(this)" lazyloadthumb="1" border="0" alt="" /> 谢谢分享,有用 嗯嗯 可以的。 学习学习<br />谢谢分享 zhic............................ 升级我能升级成功,但是3。5网站迁移,我就不会了<br /><br />希望有会的,也发个教程。感谢 这个厉害,可惜我已经不想升了。 打开ucenter数据库重建表文件uc.sql 这一步怎么操作?
頁:
[1]