[教學] phpBB 2.0.11 更新至 2.0.12 的步驟

phpBB Installation & Usage Support
phpBB 2 安裝於各類型作業平台之問題討論;外掛問題,請到相關版面依發問格式發表!
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

版面規則
本區是討論關於 phpBB 2.0.X 架設安裝上的問題,只要有安裝任何外掛,請到外掛討論相關版面按照公告格式發表。
(發表文章請按照公告格式發表,違者砍文)
神川小羽
調皮の小羽
調皮の小羽
文章: 1461
註冊時間: 2004-05-01 05:55
來自: 謎樣之筱語
聯繫:

文章 神川小羽 »

gogopen 寫:點解我係common.php中找不到要更改的code...
我的版本是2.0.11
你的並不是2.0.11唷
-.-
gogopen
星球公民
星球公民
文章: 49
註冊時間: 2004-08-21 12:32

文章 gogopen »

神川小羽 寫:
gogopen 寫:點解我係common.php中找不到要更改的code...
我的版本是2.0.11
你的並不是2.0.11唷
我一直都係用patch的方法來upgrade個phpBB2,由2.0.2開始到現在,已是2.0.11版本。咁我想問問有甚麼方法可upgrade to 2.0.12版本呢?請大大指教...
ischen
星球普通子民
星球普通子民
文章: 10
註冊時間: 2002-07-12 17:32

文章 ischen »

搞定了 謝謝大家~
小弟發現 functions.php 裡面的函示 } 擺錯位置
感謝 iamelton 兄的提醒 :)
andy0103
星球普通子民
星球普通子民
文章: 10
註冊時間: 2004-12-24 17:59

文章 andy0103 »

請教各位先進!!
我的PHPBB2是由2.0.3一次升級到2.0.11
那現在怎麼辦!!common.php有些code都找不到哩\r
有辦法解決嗎!!!
謝謝
Lao
星球普通子民
星球普通子民
文章: 16
註冊時間: 2004-08-16 13:26

文章 Lao »

手動升級完成
不過本來在最下面的版本資訊也拿掉了哦?
呵呵..

感謝!;)
linyute
星球普通子民
星球普通子民
文章: 16
註冊時間: 2004-11-10 00:47

文章 linyute »

弟因重灌電腦, 重新安裝phpbb2.0.12版,
但還原資料庫後, 系統管理控制台中的版本卻變成了2.0.11...
也出現了紅色的
"你目前安裝的版本 不是 最新的. phpBB 的最新(更新)檔案可以在 http://www.phpbb.com/downloads.php 下載到.
目前最新的版本是 phpBB 2.0.12.你目前使用的是 phpBB 2.0.11. "
弟只好下載update_to_latest.php來用.
現在系統管理控制台的確出現2.0.12版, 希望不會有什麼問題...
\n
不過...為什麼"完整安裝+還原資料"版本資訊會變成舊版的呢???
iamelton
星球公民
星球公民
文章: 56
註冊時間: 2002-06-08 03:13
來自: 香港
聯繫:

文章 iamelton »

linyute 寫:弟因重灌電腦, 重新安裝phpbb2.0.12版,
但還原資料庫後, 系統管理控制台中的版本卻變成了2.0.11...
也出現了紅色的
"你目前安裝的版本 不是 最新的. phpBB 的最新(更新)檔案可以在 http://www.phpbb.com/downloads.php 下載到.
目前最新的版本是 phpBB 2.0.12.你目前使用的是 phpBB 2.0.11. "
弟只好下載update_to_latest.php來用.
現在系統管理控制台的確出現2.0.12版, 希望不會有什麼問題...

不過...為什麼"完整安裝+還原資料"版本資訊會變成舊版的呢???
你備份資料庫的時候, 它是 2.0.12 版的嗎?

補充: 實際上沒有關係, 2.0.11 版跟 2.0.12 版的資料庫沒有大分別, 唯一不同便是版本資料. update_to_latest.php 也不過是更新這個資料而已.
最後由 iamelton 於 2005-02-28 00:24 編輯,總共編輯了 1 次。
圖檔
linyute
星球普通子民
星球普通子民
文章: 16
註冊時間: 2004-11-10 00:47

文章 linyute »

iamelton 寫:
linyute 寫:弟因重灌電腦, 重新安裝phpbb2.0.12版,
但還原資料庫後, 系統管理控制台中的版本卻變成了2.0.11...
也出現了紅色的
"你目前安裝的版本 不是 最新的. phpBB 的最新(更新)檔案可以在 http://www.phpbb.com/downloads.php 下載到.
目前最新的版本是 phpBB 2.0.12.你目前使用的是 phpBB 2.0.11. "
弟只好下載update_to_latest.php來用.
現在系統管理控制台的確出現2.0.12版, 希望不會有什麼問題...

不過...為什麼"完整安裝+還原資料"版本資訊會變成舊版的呢???
你備份資料庫的時候, 它是 2.0.12 版的嗎?
是2.0.11版的哩!
iamelton
星球公民
星球公民
文章: 56
註冊時間: 2002-06-08 03:13
來自: 香港
聯繫:

文章 iamelton »

linyute 寫:
iamelton 寫:
linyute 寫:弟因重灌電腦, 重新安裝phpbb2.0.12版,
但還原資料庫後, 系統管理控制台中的版本卻變成了2.0.11...
也出現了紅色的
"你目前安裝的版本 不是 最新的. phpBB 的最新(更新)檔案可以在 http://www.phpbb.com/downloads.php 下載到.
目前最新的版本是 phpBB 2.0.12.你目前使用的是 phpBB 2.0.11. "
弟只好下載update_to_latest.php來用.
現在系統管理控制台的確出現2.0.12版, 希望不會有什麼問題...

不過...為什麼"完整安裝+還原資料"版本資訊會變成舊版的呢???
你備份資料庫的時候, 它是 2.0.12 版的嗎?
是2.0.11版的哩!
那你見到的就是完全正常啦.. 現在也不用再作甚麼了..
圖檔
linyute
星球普通子民
星球普通子民
文章: 16
註冊時間: 2004-11-10 00:47

文章 linyute »

iamelton 寫:
linyute 寫:
iamelton 寫: 你備份資料庫的時候, 它是 2.0.12 版的嗎?
是2.0.11版的哩!
那你見到的就是完全正常啦.. 現在也不用再作甚麼了..
喔喔~~~
謝謝您!!!
linyute
星球普通子民
星球普通子民
文章: 16
註冊時間: 2004-11-10 00:47

文章 linyute »

小竹子大大是不是忘了
phpBB2\templates\subSilver\images\lang_chinese_traditional_taiwan
完整包裡沒看到中文按鈕

先用2.0.11版的...
逍遙悠
竹貓忠實會員
竹貓忠實會員
文章: 313
註冊時間: 2002-11-30 16:57
來自: 遙遠的那一端

文章 逍遙悠 »

感謝 以成功更新^^
圖檔
kp3011
竹貓忠實會員
竹貓忠實會員
文章: 384
註冊時間: 2004-05-15 21:16
來自: HKG

文章 kp3011 »

●架設主機作業系統:CentOS 4.7
●您的 phpBB2 版本:phpBB 3.0.4
●您的 domain(網域名稱):www.hkbf.org | forum.hkbrda.org
godfreychan
星球公民
星球公民
文章: 86
註冊時間: 2003-05-23 10:57

Re: [問題] 點解?

文章 godfreychan »

gogopen 寫:點解我係common.php中找不到要更改的code...
我的版本是2.0.11

代碼: 選擇全部

<?php
/***************************************************************************
 *                                common.php
 *                            -------------------
 *   begin                : Saturday, Feb 23, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: common.php,v 1.74.2.3 2002/05/13 13:18:17 psotfx Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
}

error_reporting  (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime

//
// addslashes to vars if magic_quotes_gpc is off
// this is a security precaution to prevent someone
// trying to break out of a SQL statement.
//
if( !get_magic_quotes_gpc() )
{
	if( is_array($HTTP_GET_VARS) )
	{
		while( list($k, $v) = each($HTTP_GET_VARS) )
		{
			if( is_array($HTTP_GET_VARS[$k]) )
			{
				while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) )
				{
					$HTTP_GET_VARS[$k][$k2] = addslashes($v2);
				}
				@reset($HTTP_GET_VARS[$k]);
			}
			else
			{
				$HTTP_GET_VARS[$k] = addslashes($v);
			}
		}
		@reset($HTTP_GET_VARS);
	}

	if( is_array($HTTP_POST_VARS) )
	{
		while( list($k, $v) = each($HTTP_POST_VARS) )
		{
			if( is_array($HTTP_POST_VARS[$k]) )
			{
				while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) )
				{
					$HTTP_POST_VARS[$k][$k2] = addslashes($v2);
				}
				@reset($HTTP_POST_VARS[$k]);
			}
			else\r
			{
				$HTTP_POST_VARS[$k] = addslashes($v);
			}
		}
		@reset($HTTP_POST_VARS);
	}

	if( is_array($HTTP_COOKIE_VARS) )
	{
		while( list($k, $v) = each($HTTP_COOKIE_VARS) )
		{
			if( is_array($HTTP_COOKIE_VARS[$k]) )
			{
				while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) )
				{
					$HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2);
				}
				@reset($HTTP_COOKIE_VARS[$k]);
			}
			else
			{
				$HTTP_COOKIE_VARS[$k] = addslashes($v);
			}
		}
		@reset($HTTP_COOKIE_VARS);
	}
}

//
// Define some basic configuration arrays this also prevents
// malicious rewriting of language and otherarray values via
// URI params
//
$board_config = array();
$userdata = array();
$theme = array();
$images = array();
$lang = array();
$gen_simple_header = FALSE;

include($phpbb_root_path . 'config.'.$phpEx);

if( !defined("PHPBB_INSTALLED") )
{
	header("Location: install.$phpEx");
	exit;
}

include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/template.'.$phpEx);
include($phpbb_root_path . 'includes/sessions.'.$phpEx);
include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);

//
// Mozilla navigation bar
// Default items that should be valid on all pages.
// Defined here and not in page_header.php so they can be redefined in the code
//
$nav_links['top'] = array ( 
	'url' => append_sid($phpbb_root_dir."index.".$phpEx),
	'title' => sprintf($lang['Forum_Index'], $board_config['sitename'])
);
$nav_links['search'] = array ( 
	'url' => append_sid($phpbb_root_dir."search.".$phpEx),
	'title' => $lang['Search']
);
$nav_links['help'] = array ( 
	'url' => append_sid($phpbb_root_dir."faq.".$phpEx),
	'title' => $lang['FAQ']
);
$nav_links['author'] = array ( 
	'url' => append_sid($phpbb_root_dir."memberlist.".$phpEx),
	'title' => $lang['Memberlist']
);

//
// Obtain and encode users IP
//
if( getenv('HTTP_X_FORWARDED_FOR') != '' )
{
	$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR );

	if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", getenv('HTTP_X_FORWARDED_FOR'), $ip_list) )
	{
		$private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10..*/', '/^224..*/', '/^240..*/');
		$client_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);
	}
}
else
{
	$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR );
}
$user_ip = encode_ip($client_ip);

//
// Setup forum wide options, if this fails
// then we output a CRITICAL_ERROR since
// basic forum information is not available
//
$sql = "SELECT *
	FROM " . CONFIG_TABLE;
if( !($result = $db->sql_query($sql)) )
{
	message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}

while ( $row = $db->sql_fetchrow($result) )
{
	$board_config[$row['config_name']] = $row['config_value'];
}

// Auto lang mod start
// If someone spoofs the language setting, then init_userprefs() will use the default language, as the spoofed result can't be found
$language = '';
$supported_languages = array();
$accept_language = strtolower (getenv ('HTTP_ACCEPT_LANGUAGE'));
if (!empty ($accept_language))
{
	reset ($board_config);
	$needle = 'auto_lang_';
	$needle_length = strlen($needle);
	while (list ($key, $value) = each ($board_config))
	{
		if ((strstr($key, $needle)))
		{
			$supported_languages[substr ($key, $needle_length)] = $value;
		}
	}
	reset ($board_config); // Avoid nasty surprises for other coders

	if (count ($supported_languages) > 0)
	{
\n		$accepted_languages = explode (',', $accept_language);
		reset ($accepted_languages);
		while (list(, $lng) = each ($accepted_languages))
		{
			$pos = strpos ($lng, ';');
			if ($pos > 0) // The ; never occurs on position 0 in this case (unless spoofed)
			{
				$lng = substr ($lng, 0, $pos);
			}
			$lng = trim ($lng);
			if (!empty($lng))
			{
				if (isset($supported_languages[$lng]))
				{
					$language = $supported_languages[$lng];
					break;
				}
				else if (strstr($lng,'-')) // A user can have entered '-' at pos 0, so strpos is out for PHP 3 compliance
				{
					// break it up at the '-'
					$lng = substr($lng, 0, strpos($lng, '-'));
					if (!empty($lng) && isset($supported_languages[$lng]))
					{
						$language = $supported_languages[$lng];
						break;
					}
				}
			}
		}
	}
}
if (!empty ($language))
{
	$board_config['default_lang'] = $language;
}
// Auto lang mod end


//
// Show 'Board is disabled' message if needed.
//
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
	message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
}

?>
我的也是, 請問大大們怎樣改是好?
godfreychan
星球公民
星球公民
文章: 86
註冊時間: 2003-05-23 10:57

文章 godfreychan »

神川小羽 寫:我拿一個全新的2.0.8a去比對唯一不同的地方就是有加入了一段\r

代碼: 選擇全部

if ( defined('IN_CASHMOD') )
{
	include($phpbb_root_path . 'includes/functions_cash.'.$phpEx);
}
除此之外其他全部跟2.0.8a完全相同
神川小羽大大\r

我的情況跟以上的版友也是一樣, 如果我的版真是2.0.8的話...我要如何改到2.0.13去呢? 貼上現在common.php的code參考看

代碼: 選擇全部

<?php
/***************************************************************************
 *                                common.php
 *                            -------------------
 *   begin                : Saturday, Feb 23, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: common.php,v 1.6 2003/08/30 15:05:44 acydburn Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
}

error_reporting  (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime

//
// addslashes to vars if magic_quotes_gpc is off
// this is a security precaution to prevent someone
// trying to break out of a SQL statement.
//
if( !get_magic_quotes_gpc() )
{
	if( is_array($HTTP_GET_VARS) )
	{
		while( list($k, $v) = each($HTTP_GET_VARS) )
		{
			if( is_array($HTTP_GET_VARS[$k]) )
			{
				while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) )
				{
					$HTTP_GET_VARS[$k][$k2] = addslashes($v2);
				}
				@reset($HTTP_GET_VARS[$k]);
			}
			else
			{
				$HTTP_GET_VARS[$k] = addslashes($v);
			}
		}
		@reset($HTTP_GET_VARS);
	}

	if( is_array($HTTP_POST_VARS) )
	{
		while( list($k, $v) = each($HTTP_POST_VARS) )
		{
			if( is_array($HTTP_POST_VARS[$k]) )
			{
				while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) )
				{
					$HTTP_POST_VARS[$k][$k2] = addslashes($v2);
				}
				@reset($HTTP_POST_VARS[$k]);
			}
			else
			{
				$HTTP_POST_VARS[$k] = addslashes($v);
			}
		}
		@reset($HTTP_POST_VARS);
	}

	if( is_array($HTTP_COOKIE_VARS) )
	{
		while( list($k, $v) = each($HTTP_COOKIE_VARS) )
		{
			if( is_array($HTTP_COOKIE_VARS[$k]) )
			{
				while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) )
				{
					$HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2);
				}
				@reset($HTTP_COOKIE_VARS[$k]);
			}
			else
			{
				$HTTP_COOKIE_VARS[$k] = addslashes($v);
			}
		}
		@reset($HTTP_COOKIE_VARS);
	}
}

//
// Define some basic configuration arrays this also prevents
// malicious rewriting of language and otherarray values via
// URI params
//
$board_config = array();
$userdata = array();
$theme = array();
$images = array();
$lang = array();
$gen_simple_header = FALSE;

include($phpbb_root_path . 'config.'.$phpEx);

if( !defined("PHPBB_INSTALLED") )
{
	header("Location: install/install.$phpEx");
	exit;
}

include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/template.'.$phpEx);
include($phpbb_root_path . 'includes/sessions.'.$phpEx);
include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);

//
// Obtain and encode users IP
//
if( getenv('HTTP_X_FORWARDED_FOR') != '' )
{
	$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR );

	$entries = explode(',', getenv('HTTP_X_FORWARDED_FOR'));
	reset($entries);
	while (list(, $entry) = each($entries)) 
	{
		$entry = trim($entry);
		if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", $entry, $ip_list) )
		{
			$private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.((1[6-9])|(2[0-9])|(3[0-1]))\..*/', '/^10\..*/', '/^224\..*/', '/^240\..*/');
			$found_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);

			if ($client_ip != $found_ip)
			{
				$client_ip = $found_ip;
				break;
			}
		}
	}
}
else
{
	$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR );
}
$user_ip = encode_ip($client_ip);

//
// Setup forum wide options, if this fails
// then we output a CRITICAL_ERROR since
// basic forum information is not available
//
$sql = "SELECT *
	FROM " . CONFIG_TABLE;
if( !($result = $db->sql_query($sql)) )
{
	message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}

while ( $row = $db->sql_fetchrow($result) )
{
	$board_config[$row['config_name']] = $row['config_value'];
}
include($phpbb_root_path . 'attach_mod/attachment_mod.'.$phpEx);

if (file_exists('install') || file_exists('contrib'))
{
	message_die(GENERAL_MESSAGE, 'Please ensure both the install/ and contrib/ directories are deleted');
}

//
// Show 'Board is disabled' message if needed.
//
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
	message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
}

?>
主題已鎖定

回到「phpBB 2 安裝與使用」