[問題]論壇銀行無法執行install.php(已解決)

phpBB 2 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

主題已鎖定
evomagic
星球公民
星球公民
文章: 83
註冊時間: 2003-10-18 13:52

[問題]論壇銀行無法執行install.php(已解決)

文章 evomagic »

問題外掛:論壇銀行-(增加貸款功能)
參考連結: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();

?>
錯誤訊息\r

代碼: 選擇全部

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
圖檔
動機不明
喝咖啡的綠皮猴
喝咖啡的綠皮猴
文章: 1179
註冊時間: 2002-03-06 20:37
來自: GOP (重啟)

文章 動機不明 »

我猜你大概是把 bank_install.php 放錯位置執行了!
c:\appserv\www\phpbb\install\bank_install.php

試著改到\r

c:\appserv\www\phpbb\bank_install.php

看看~
非官方外掛問題區公告: [必看]請配合發問格式及明確主題發問(2006 02/24更新)
七點要求:
1. 發問前先搜尋,確定沒有重複後再發表
2. 主題要明確
3. 依照發問格式
4. 禁連續推文
5. 請盡量減少使用地方性語言
6. 解決問題後請修改第一篇主題,並感謝曾經幫過你的前輩們 ^^
7. 請不要將檔案內容完整貼出喔! 只要提供問題行及上下各五行就可以了
evomagic
星球公民
星球公民
文章: 83
註冊時間: 2003-10-18 13:52

文章 evomagic »

哇!真的是這樣耶!超感謝動機不明大大支援!感動中~~~~^_^
圖檔
主題已鎖定

回到「外掛問題討論」