問題外掛:Nutport 1.0b3 中文版
參考連結:http://phpbb-tw.net/phpbb/viewtopic.php?t=21726
使用版本:phpBB 2.0.5
網站位置:http://taywe.net/jweb/HL/portal.php
狀況描述:
設定一開始很正常
過一陣子後
在後台設定細節
出來"突然"就出現這些文字
Couldn't obtain news information
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND t.topic_poster = u.user_id AND p.post_id = t.topic_first
SELECT t.*, u.username, u.user_id, p.*, x.* FROM phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_posts_text x WHERE t.forum_id = AND t.topic_poster = u.user_id AND p.post_id = t.topic_first_post_id AND x.post_id = t.topic_first_post_id ORDER BY t.topic_time DESC
Line : 293
File : d:\windows2003service\www\jweb\hl\portal.php
變這樣了...
http://taywe.net/jweb/HL/portal.php
之前明明都很正常...
請問是不是資料庫出問題了?
如果是的話\r
我該如何刪掉資料庫裡安裝"入口網頁"的東西呢?
麻煩會的人教教我
在這裡先說聲謝謝!
[問題]Nutport 1.0b3 中文版 資料庫問題!
版主: 版主管理群
-
messagebox
- 竹貓忠實會員

- 文章: 981
- 註冊時間: 2003-02-24 23:34
SELECT t.*, u.username, u.user_id, p.*, x.* FROM phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_posts_text x WHERE t.forum_id = AND t.topic_poster = u.user_id AND p.post_id = t.topic_first_post_id AND x.post_id = t.topic_first_post_id ORDER BY t.topic_time DESC
t.forum_id要跟哪個值比對呢??
檢查一下後面是不是少了什麼~~
是不是變數沒拿到~還是你少輸入了什麼~~
剛剛去下載了MOD的檔案~
原檔案處應為\r
WHERE t.forum_id = $page_forum
很明顯的~~
你並沒有拿到$page_forum的值~
t.forum_id要跟哪個值比對呢??
檢查一下後面是不是少了什麼~~
是不是變數沒拿到~還是你少輸入了什麼~~
剛剛去下載了MOD的檔案~
原檔案處應為\r
WHERE t.forum_id = $page_forum
很明顯的~~
你並沒有拿到$page_forum的值~
-
Sirius Black
- 星球普通子民

- 文章: 20
- 註冊時間: 2003-10-17 22:33
- 來自: 星銀島
- 聯繫:
我記得資料庫應該會自動新增
去phpmyadmin看看...是否有phpbb_portal
可以用以下語法手動新增資料庫\r
去phpmyadmin看看...是否有phpbb_portal
可以用以下語法手動新增資料庫\r
代碼: 選擇全部
<?php
/***************************************************************************
* nutport_install_sql.php
* -------------------
*
*
***************************************************************************/
/***************************************************************************
*
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
//
if( !$userdata['session_logged_in'] )
{
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . append_sid("login.$phpEx?redirect=db_update.$phpEx", true));
exit;
}
if( $userdata['user_level'] != ADMIN )
{
message_die(GENERAL_MESSAGE, 'You are not authorised to access this page');
}
$page_title = 'Updating the database';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
echo '<table width="100%" cellspacing="1" cellpadding="2" border="0" class="forumline">';
echo '<tr><th>Updating the database</th></tr><tr><td><span class="genmed"><ul type="circle">';
$sql = array();
$sql[] = "CREATE TABLE " . $table_prefix . "portal (
portal_id mediumint(8) auto_increment NOT NULL,
portal_order mediumint(8) NOT NULL,
portal_title varchar(60) NOT NULL,
portal_description text NULL,
portal_bbcode_id varchar(10) NOT NULL,
portal_use_url tinyint(1) NULL,
portal_forum mediumint(8) NOT NULL,
portal_url varchar(250) NOT NULL,
portal_list_limit mediumint(8) NOT NULL,
portal_ascending tinyint(1) NULL,
portal_nodate tinyint(1) NULL,
portal_button_name varchar(100) NOT NULL,
portal_button_image varchar(100) NOT NULL,
portal_navbar tinyint(1) NULL,
portal_login tinyint(1) NULL,
portal_online tinyint(1) NULL,
portal_latest tinyint(1) NULL,
portal_poll tinyint(1) NULL,
PRIMARY KEY (portal_id)
)";
for( $i = 0; $i < count($sql); $i++ )
{
if( !$result = $db->sql_query ($sql[$i]) )
{
$error = $db->sql_error();
echo '<li>' . $sql[$i] . '<br /> +++ <font color="#FF0000"><b>Error:</b></font> ' . $error['message'] . '</li><br />';
}
else
{
echo '<li>' . $sql[$i] . '<br /> +++ <font color="#00AA00"><b>Successfull</b></font></li><br />';
}
}
echo '</ul></span></td></tr><tr><td class="catBottom" height="28">&</td></tr>';
echo '<tr><th>End</th></tr><tr><td><span class="genmed">Installation is now finished. Please be sure to delete this file now.<br />If you have run into any errors, please visit the <a href="http://www.phpbbhacks.com/forums" target="_phpbbhacks">phpBBHacks.com support forums</a> and ask someone for help.</span></td></tr>';
echo '<tr><td class="catBottom" height="28" align="center"><span class="genmed"><a href="' . append_sid("index.$phpEx") . '">Have a nice day</a></span></td></table>';
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
最後由 Sirius Black 於 2003-12-22 18:23 編輯,總共編輯了 1 次。
-
Sirius Black
- 星球普通子民

- 文章: 20
- 註冊時間: 2003-10-17 22:33
- 來自: 星銀島
- 聯繫:
-
Sirius Black
- 星球普通子民

- 文章: 20
- 註冊時間: 2003-10-17 22:33
- 來自: 星銀島
- 聯繫:
-
Sirius Black
- 星球普通子民

- 文章: 20
- 註冊時間: 2003-10-17 22:33
- 來自: 星銀島
- 聯繫: