怎么解决 织梦500

阅读  ·  发布日期 2019-06-29 10:16  ·  admin
织梦造成500错误的原因大致如下,找到你出问题的原因,按步骤解决即可:

1、安装了部分插件,造成后台打不开,提示500错误

【解决方案】删除不需要的插件,或者存在安全漏洞的插件,这样也是为你们的网站考虑。

2、网站首页或者其他页面只能通过.Php文件访问,其他情况下全部是500错误

【解决方案】这种情况是由于部分服务器或者主机设置了权限,大家可以参照下图通过FTP进行设置

3、在PHP不用版本显示500报错@session_register($this->keepUserIDTag);这种代码在PHP5.3以上版本直接报Fatal
error错误。

【原因分析】织梦不支持PHP5.3、PHP5.4及以上版本了,主要原为是php5.4的版本废除了session_register函数

这种方式处理完整代码如下$_SESSION[$this->keepUserIDTag]
= $this->userID;

首先打开
include/userlogin.class.php这个文件,在287行到308行:

01.@session_register($this->keepUserIDTag);

02.$_SESSION[$this->keepUserIDTag] = $this->userID;

03.@session_register($this->keepUserTypeTag);

04.$_SESSION[$this->keepUserTypeTag] = $this->userType;

05.@session_register($this->keepUserChannelTag);

06.$_SESSION[$this->keepUserChannelTag] = $this->userChannel;

07.@session_register($this->keepUserNameTag);

08.$_SESSION[$this->keepUserNameTag] = $this->userName;

09.@session_register($this->keepUserPurviewTag);

10.$_SESSION[$this->keepUserPurviewTag] = $this->userPurview;

11.@session_register($this->keepAdminStyleTag);

12.$_SESSION[$this->keepAdminStyleTag] = $adminstyle;

13.PutCookie('DedeUserID', $this->userID, 3600 * 24, '/');

14.PutCookie('DedeLoginTime', time(), 3600 * 24, '/');

替换成下面的

01.//@session_register($this->keepUserIDTag);

02.$_SESSION[$this->keepUserIDTag] = $this->keepUserIDTag;

03.$_SESSION[$this->keepUserIDTag] = $this->userID;

04.//@session_register($this->keepUserTypeTag);

05.$_SESSION[$this->keepUserTypeTag] = $this->keepUserTypeTag;

06.$_SESSION[$this->keepUserTypeTag] = $this->userType;

07.// @session_register($this->keepUserChannelTag);

08.$_SESSION[$this->keepUserChannelTag] = $this->keepUserChannelTag;

09.$_SESSION[$this->keepUserChannelTag] = $this->userChannel;

10.//@session_register($this->keepUserNameTag);

11.$_SESSION[$this->keepUserNameTag] = $this->keepUserNameTag;

12.$_SESSION[$this->keepUserNameTag] = $this->userName;

13.//@session_register($this->keepUserPurviewTag);

14.$_SESSION[$this->keepUserPurviewTag] = $this->keepUserPurviewTag;

15.$_SESSION[$this->keepUserPurviewTag] = $this->userPurview;

16.// @session_register($this->keepAdminStyleTag);

17.$_SESSION[$this->keepAdminStyleTag] = $this->keepAdminStyleTag;

18.$_SESSION[$this->keepAdminStyleTag] = $adminstyle;

19.PutCookie(‘DedeUserID’, $this->userID, 3600 * 24, ‘/’);

20.PutCookie(‘DedeLoginTime’, time(), 3600 * 24, ‘/’);

4、如果网页文件确实不存在,可通过FTP或登陆服务器查看报错的文件是否存在,如存在,则检查上面两种。

5、后台管理界面出现500错误提示

【解决方案】这是程序文件错误。可以检查下后台文件,在管理目录dede文件下的文件没有修改的话建议重新下载一个dede文件夹,再把dede文件夹覆盖一下