怎么解決 織夢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文件夾覆蓋一下