DedeCMS 5.7不相容PHP 5.4版本的解決辦法
解決方法一:
開啟 include/userlogin.class.php這個檔案,在287行到308行原內容如下:
@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, ‘/’);
替換成
global $admincachefile,$adminstyle;
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, ‘/’);
至此問題解決。
解決方法二:
找到include資料夾中的userlogin.class.php檔案中把所有帶有session_register的全部刪除即可。
@session_register下的所有語句遮蔽掉
function keepUser()
{
if($this->userID != ” && $this->userType != ”)
{
global $admincachefile,$adminstyle;
if(empty($adminstyle)) $adminstyle = ‘dedecms’;
程式碼如下 複製程式碼
$_SESSION[$this->keepAdminStyleTag] = $adminstyle;
PutCookie(‘DedeUserID’, $this->userID, 3600 * 24, ‘/’);
PutCookie(‘DedeLoginTime’, time(), 3600 * 24, ‘/’);
$this->ReWriteAdminChannel();
return 1;
}
else{….以下省略
相關文章
- 織夢dedecms channelartlist下autoindex失效解決辦法Index
- ie不相容的幾個js問題及解決辦法JS
- PHP提示Notice: Undefined variable的解決辦法PHPUndefined
- DedeCMS Error: Tag disabled: "php" 解決方法ErrorPHP
- IBM版本差異的高明解決辦法IBM
- dedeCMS 會員中心文件分頁條 0 資料的解決辦法
- 檢測到不相容的鍵盤驅動程式的解決辦法
- php json提交亂碼的解決辦法PHPJSON
- MySQL5.7 group by新特性報錯1055的解決辦法MySql
- php png失真的原因及解決辦法PHP
- PHP編譯錯誤及解決辦法PHP編譯
- phpmyadmin 提示 PHP 5.2+ is required 的解決辦法PHPUI
- Mysql5.7錯誤日誌時間不對的解決辦法MySql
- [php]wmap應用程式無法啟動解決辦法PHP
- jenkins調整jdk版本不生效的解決辦法JenkinsJDK
- python版本不相容怎麼解決Python
- win10直通車檢測不相容驅動通用解決辦法Win10
- oracle 10.2 for linux 5.7 netca錯誤解決辦法OracleLinux
- 一、PHP5.4的基本語法格式PHP
- Navicat tnt版本提示“failed to save password error code”的解決辦法AIError
- 跳過微信過低版本的解決辦法 3.6.0.18
- php onethink驗證碼不顯示的解決辦法PHP
- PHP報錯“Parseerror:syntaxerror,unexpectedT_VARIABLE”的解決辦法PHPError
- dedecms登陸後臺提示"你的使用者名稱不存在"的解決辦法
- OpenStack 的NAT解決辦法
- 公寓噪音的解決辦法
- win10獲取會員版本是灰色的解決辦法Win10
- phpmyadmin在PHP7中顯示空白的解決辦法!PHP
- valet install 報 Unable to determine linked PHP. 的解決辦法PHP
- 網站執行PHP出現No input file specified 的解決辦法網站PHP
- dedeCMS標籤[field:typedir/]中{cmspath}的去除辦法
- dedecms網站管理系統後臺空白的解決辦法大全網站
- VUE專案無法啟動NODE版本與NODE-SASS、SASS-LOADER版本不相容解決方案Vue
- SVN被鎖的解決辦法
- ORA-28056的解決辦法
- job都停了的解決辦法
- github慢解決辦法Github
- Grub Rescue解決辦法