參考連結:http://phpbb-tw.net/phpbb/viewtopic.php ... B%C8%A6%E6
使用版本:phpBB 2.0.3
狀況描述:執行資料夾內附bank_install.php出現錯誤訊息,天阿最進裝幾個外掛都不順利,各為大大幫幫我吧!(好想哭喔!)
bank_install.php內容
代碼: 選擇全部
<?php
/***************************************************************************
* bank.php
* -------------------
* Version : 1.1.0
* began : Tuesday, December 17th, 2002
* released : Wednesday, December 18th, 2002
* source form : ice_rain_@hotmail.com
* modify : goldwing_chien@acer.com.tw
* modify date : 2003/05/23
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path='./';
include($phpbb_root_path.'extension.inc');
include($phpbb_root_path.'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
\n
if( !$userdata['session_logged_in'] )
{
header('Location: ' . append_sid("login.$phpEx?redirect=bank_install.$phpEx", true));
}
if( $userdata['user_level'] != ADMIN )
{
message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
}
if( !strstr($dbms, "mysql") )
{
if( !isset($bypass) )
{
$message = 'This mod has only been tested on MySQL and may only work on MySQL.<br />';
$message .= 'Click <a href="mod_install.php?bypass=true">here</a> to install anyways.';
message_die(GENERAL_MESSAGE, $message);
}
}
$sql = array();
$sql[] = "insert into " . CONFIG_TABLE . " values ('bankfees', '0.01')";
$sql[] = "insert into " . CONFIG_TABLE . " values ('bankpayouttime', '".time()."')";
$sql[] = "insert into " . CONFIG_TABLE . " values ('bankname', 'Forums Bank')";
$sql[] = "insert into " . CONFIG_TABLE . " values ('bankpayset', '1')";
$sql[] = "insert into " . CONFIG_TABLE . " values ('bankloanfees', '0.40')";
$sql[] = "insert into " . CONFIG_TABLE . " values ('bankpayoutloantime', '".time()."')";
$sql[] = "insert into " . CONFIG_TABLE . " values ('loanmax', '50000')";
$sql[] = "insert into " . CONFIG_TABLE . " values ('bankpayloanset', '30')";
$sql[] = "ALTER TABLE ".USERS_TABLE." ADD `user_bank` INT(11) UNSIGNED DEFAULT '0' NOT NULL";
$sql[] = "ALTER TABLE ".USERS_TABLE." ADD `user_loan` INT(11) UNSIGNED DEFAULT '0' NOT NULL";
$sql_count = count($sql);
echo "<html>
";
echo "<body>
";
for($i = 0; $i < $sql_count; $i++)
{
echo "Running :: " . $sql[$i];
flush();
if ( !$db->sql_query($sql[$i]) )
{
$errored = true;
$error = $db->sql_error();
echo " -> <b>FAILED</b> ---> <u>" . $error['message'] . "</u><br /><br />
";
}
else
{
echo " -> <b>COMPLETED</b><br /><br />
";
}
}
if( $errored )
{
$message = "Some of the querys have failed, contact me so I can fix the errors.";
}
else
{
$message = "The table have been edited successfully. You can now delete this file.";
}
echo "
<br />
<b>Finished!</b><br />
";
echo $message . "<br />
";
echo "</body>
";
echo "</html>
";
exit();
?>代碼: 選擇全部
Warning: main(./extension.inc): failed to open stream: No such file or directory in c:\appserv\www\phpbb\install\bank_install.php on line 15
Warning: main(): Failed opening './extension.inc' for inclusion (include_path='.;c:\php4\pear') in c:\appserv\www\phpbb\install\bank_install.php on line 15
Warning: main(./common.): failed to open stream: No such file or directory in c:\appserv\www\phpbb\install\bank_install.php on line 16
Warning: main(): Failed opening './common.' for inclusion (include_path='.;c:\php4\pear') in c:\appserv\www\phpbb\install\bank_install.php on line 16
Fatal error: Call to undefined function: session_pagestart() in c:\appserv\www\phpbb\install\bank_install.php on line 21

