1 頁 (共 1 頁)

[問題] common.php升級時問題(Fixed)

發表於 : 2005-10-31 22:02
Cycler An
版本: 升2.0.18中\r
升級經過: 正在新增common.php代碼部分
錯誤訊息:

代碼: 選擇全部

Fatal error: Call to a member function on a non-object in /home/iray/public_html/cycling/common.php on line 215
common.php (215行左右):

代碼: 選擇全部

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);
// We do not need this any longer, unset for safety purposes
unset($dbpasswd);


//
// Obtain and encode users IP
//
// I'm removing HTTP_X_FORWARDED_FOR ... this may well cause other problems such as
// private range IP's appearing instead of the guilty routable IP, tough, don't
// even bother complaining ... go scream and shout at the idiots out there who feel
// "clever" is doing harm rather than good ... karma is a great thing ... :)
//
$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : getenv('REMOTE_ADDR') );
$user_ip = encode_ip($client_ip);
-謝謝!

發表於 : 2005-10-31 22:09
flower

代碼: 選擇全部

include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
// We do not need this any longer, unset for safety purposes
unset($dbpasswd);
include($phpbb_root_path . 'includes/db.'.$phpEx);
這句不見了?

發表於 : 2005-10-31 22:11
右手

代碼: 選擇全部

// We do not need this any longer, unset for safety purposes
unset($dbpasswd);
上面應該有這一行

代碼: 選擇全部

include($phpbb_root_path . 'includes/db.'.$phpEx);
你把那行幹掉了?

發表於 : 2005-10-31 22:23
Cycler An
謝謝兩位大大! :lol: