OSCommerce 出現 Deprecated: Function session_register() is deprecated
移轉到在 PHP5 環境下碰到的問題Deprecated: Function session_register() is deprecated in C:\xampp\htdocs\osc\includes\functions\sessions.php on line 74
可以修改 includes/functions/sessions.php 找到[code]
function tep_session_register($variable) {
global $session_started;
if ($session_started == true) {
return session_register($variable);
} else {
return false;
}
}
[/code]改成[code]
function tep_session_register($variable) {
global $session_started;
if ($session_started == true) {
if (PHP_VERSION < 4.3) {
return session_register($variable);
} else {
if (isset($GLOBALS[$variable])) {
$_SESSION[$variable] =& $GLOBALS[$variable];
} else {
$_SESSION[$variable] = null;
}
}
}
return false;
}
[/code]參考資料 [url]http://forums.oscommerce.com/topic/342525-page-script-error/[/url] 這也是舊版的 osc 2.2 ms2 (KMD 的版本) 因為程式太老舊,
部份程式指令在較新版的 php (php 5.3 或更新) 已不再支援,
故無法安裝運作.
建議改用 OSC 2.3.1 台灣中文版 ( 2011 年釋出 ) ,
請參考 [url]http://www.twosc.com[/url]
台灣 OSC 社群
頁:
[1]