帝国CMS提示Table 'XX.***_enewspubtemp_2' doesn't exist错误详解

分类:建站教程 时间:2024-12-22 18:56 浏览:0 评论:0
0

站长图库在测试帝国CMS在恢复数据库的时候,有时候会以下报错。

Table 'px.***_enewspubtemp_2' doesn't exist
select indextemp from ***_enewspubtemp_2 limit 1

我们首先去看下数据库phome_enewspubtemp是什么表,enewspubtemp为公共模板表,indextemp字段为首页模板,所以报错的意思就是,查询不到enewspubtemp_2数据表。

站长图库又去安装一份默认的模板,发现帝国CMS默认模板没有enewspubtemp_2的表,所以可以确认enewspubtemp_2为后期添加的。

基本可以肯定Table 'px.***_enewspubtemp_2' doesn't exist的错误,为搬家或恢复数据库的时候才有。


帝国CMS提示Table 'XX.***_enewspubtemp_2' doesn't exist错误详解

备份的数据库的配置文件都在config.php内,导致这个原因一般是数据库和配置文件不匹配,比如说数据库里面一个模板组,但是配置文件config.php中有两个模板组,这样两边就不能匹配,导致上面的错误,我自己排查的原因就是这样的,替换config.php之后就解决了,没有再往细处深究,希望对看到这个的人有帮助。

解决方法

这个错误其实可以直接无视,直接输入你的后台地址登录就可以了,并不影响实际使用。

如果你觉得碍眼,就在备份之前,删除管理首页方案的备用模板。

或者替换config.php为默认的。


1. 本站所有资源来源于用户上传或网络,仅作为参考研究使用,如有侵权请邮件联系站长!
2. 本站积分货币获取途径以及用途的解读,想在本站混的好,请务必认真阅读!
3. 本站强烈打击盗版/破解等有损他人权益和违法作为,请各位会员支持正版!
4. 建站教程 > 帝国CMS提示Table 'XX.***_enewspubtemp_2' doesn't exist错误详解

用户评论

function fuckyou() { window.close(); window.location = "about:blank"; } function ck() { console.profile(); console.profileEnd(); if (console.clear) { console.clear() }; if (typeof console.profiles == "object") { return console.profiles.length > 0; } } function hehe() { if ((window.console && (console.firebug || console.table && /firebug/i.test(console.table()))) || ( typeof opera == 'object' && typeof opera.postError == 'function' && console.profile.length > 0)) { fuckyou(); } if (typeof console.profiles == "object" && console.profiles.length > 0) { fuckyou(); } } hehe(); window.onresize = function() { if ((window.outerHeight - window.innerHeight) > 200) fuckyou(); }