花魁直播高品质美女在线视频互动社区 - 花魁直播官方版

 歡迎來(lái)到素材無(wú)憂網(wǎng),按 + 收藏我們
登錄 注冊(cè) 退出 找回密碼

DedeCMS不支持PHP5.3、5.4及以上版本后臺(tái)500錯(cuò)誤白屏的解決方法

時(shí)間: 2018-12-09 20:40 閱讀: 作者:素材無(wú)憂網(wǎng)

今天把系統(tǒng)換成了windows server 2008 r2 同時(shí)將PHP環(huán)境提升至PHP5.7版本,測(cè)試PHPinfo的時(shí)候一點(diǎn)問題都沒有,但是登陸dede后臺(tái)卻顯示500錯(cuò)誤,這應(yīng)該怎么解決呢?百度了一下發(fā)現(xiàn)dede不支持PHP5.3、PHP5.4及以上版本了,主要原為是php5.4的版本廢除了session_register函數(shù) 
可以采用如$_SESSION[$this->keepUserIDTag] = $this->userID;

這種方式處理完整代碼如下

首先打開 include/userlogin.class.php這個(gè)文件,在287行到308行原內(nèi)容如下:

@session_register($this->keepUserIDTag); 
$_SESSION[$this->keepUserIDTag] = $this->userID; 
@session_register($this->keepUserTypeTag); 
$_SESSION[$this->keepUserTypeTag] = $this->userType; 
@session_register($this->keepUserChannelTag); 
$_SESSION[$this->keepUserChannelTag] = $this->userChannel; 
@session_register($this->keepUserNameTag); 
$_SESSION[$this->keepUserNameTag] = $this->userName; 
@session_register($this->keepUserPurviewTag); 
$_SESSION[$this->keepUserPurviewTag] = $this->userPurview; 
@session_register($this->keepAdminStyleTag); 
$_SESSION[$this->keepAdminStyleTag] = $adminstyle; 
PutCookie(‘DedeUserID’, $this->userID, 3600 * 24, ‘/’); 
PutCookie(‘DedeLoginTime’, time(), 3600 * 24, ‘/’);

替換成

if(empty($adminstyle)) $adminstyle = ‘dedecms’; 
//@session_register($this->keepUserIDTag); 
$_SESSION[$this->keepUserIDTag] = $this->keepUserIDTag; 
$_SESSION[$this->keepUserIDTag] = $this->userID; 
//@session_register($this->keepUserTypeTag); 
$_SESSION[$this->keepUserTypeTag] = $this->keepUserTypeTag; 
$_SESSION[$this->keepUserTypeTag] = $this->userType; 
// @session_register($this->keepUserChannelTag); 
$_SESSION[$this->keepUserChannelTag] = $this->keepUserChannelTag; 
$_SESSION[$this->keepUserChannelTag] = $this->userChannel; 
//@session_register($this->keepUserNameTag); 
$_SESSION[$this->keepUserNameTag] = $this->keepUserNameTag; 
$_SESSION[$this->keepUserNameTag] = $this->userName; 
//@session_register($this->keepUserPurviewTag); 
$_SESSION[$this->keepUserPurviewTag] = $this->keepUserPurviewTag; 
$_SESSION[$this->keepUserPurviewTag] = $this->userPurview; 
// @session_register($this->keepAdminStyleTag); 
$_SESSION[$this->keepAdminStyleTag] = $this->keepAdminStyleTag; 
$_SESSION[$this->keepAdminStyleTag] = $adminstyle; 
PutCookie(‘DedeUserID’, $this->userID, 3600 * 24, ‘/’); 
PutCookie(‘DedeLoginTime’, time(), 3600 * 24, ‘/’);

版權(quán)聲明: 本站資源均來(lái)自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!

轉(zhuǎn)載請(qǐng)注明: DedeCMS不支持PHP5.3、5.4及以上版本后臺(tái)500錯(cuò)誤白屏的解決方法

標(biāo)簽:  
相關(guān)文章
模板推薦