[問題] 無法發表新主題......已解決

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

版主: 版主管理群

版面規則
本區是討論關於 phpBB 2.0.X 架設安裝上的問題,只要有安裝任何外掛,請到外掛討論相關版面按照公告格式發表。
(發表文章請按照公告格式發表,違者砍文)
主題已鎖定
shinwella
星球普通子民
星球普通子民
文章: 15
註冊時間: 2005-06-28 19:45

[問題] 無法發表新主題......已解決

文章 shinwella »

安裝好後~曾經換過網址、搬過資料庫,

當要發表新主題....
可以預覽,但是按下送出鈕就會出現下列的錯誤訊息:

代碼: 選擇全部

Error in posting

DEBUG MODE

INSERT INTO phpBB2_posts (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig , hideit) VALUES (12, 2, 2, '', 1123539951, '3de4af65', 1, 0, 1, 0 , 0)

Line : 270
File : functions_post.php
我只有裝『文章遮蔽的外掛』,
也查過這個外掛是在268行以上,
而且以前也曾經在FI APPLE風格(phpbb2.0.16)裝過沒問題(現在用的是與竹貓星球相同風格-->phpbb2.0.17),
所以應該跟這個外掛沒有關係吧!

請前輩們指導!
謝謝喔!
最後由 shinwella 於 2005-08-09 14:39 編輯,總共編輯了 1 次。
●架設主機作業系統:Linux
●我的上網方式:ADSL (中華電信)
●我安裝的程式:PHP:5.4.38 + MySQL:5.5.36-cll-lve
●我的 phpBB 版本:phpBB (3.1.3)
小竹子
竹貓星球大統領
竹貓星球大統領
文章: 4596
註冊時間: 2001-10-29 22:13
來自: 竹貓星球
聯繫:

文章 小竹子 »

有升級過後外掛要重新安裝唷^^
注意事項:
●phpBB 架設相關問題請到 + phpBB 3.0.x 討論區發表!
●都沒有你要的答案嗎??>>點這裡<<搜尋一下吧!
●請使用>>標準的發文格式<<發表問題!
●竹貓星球並非政治團體代言人,請不要在竹貓討論政治議題,也不要認為竹貓是偏向任何一方政治團體,竹貓愛的是台灣這片生長的土地,過於泛政治化文章請來信告知移除!
●關於 phpBB 使用問題請在版面發問,私人訊息提供其他不相干或是隱私的事情聯絡之用。
●所有市面上的免費空間皆非竹貓管轄,請勿來信詢問,請直接與該免費空間連絡。
shinwella
星球普通子民
星球普通子民
文章: 15
註冊時間: 2005-06-28 19:45

文章 shinwella »

小竹子 寫:有升級過後外掛要重新安裝唷^^
不好意思!沒說清楚!
我是完全重新安裝2.0.17版本的,並沒有拿2.0.16版的檔案來覆蓋唷!

includes/functions_post.php檔案如下:

代碼: 選擇全部

//
// Post a new topic/reply/poll or edit existing post/poll
//
文章遮蔽外掛修改之第一個地方-->function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length , $post_hideit = 0)<--結束
{
	global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
	global $userdata, $user_ip;

	include($phpbb_root_path . 'includes/functions_search.'.$phpEx);

	$current_time = time();

	if ($mode == 'newtopic' || $mode == 'reply' || $mode == 'editpost') 
	{
		//
		// Flood control
		//
		$where_sql = ($userdata['user_id'] == ANONYMOUS) ? "poster_ip = '$user_ip'" : 'poster_id = ' . $userdata['user_id'];
		$sql = "SELECT MAX(post_time) AS last_post_time
			FROM " . POSTS_TABLE . "
			WHERE $where_sql";
		if ($result = $db->sql_query($sql))
		{
			if ($row = $db->sql_fetchrow($result))
			{
				if (intval($row['last_post_time']) > 0 && ($current_time - intval($row['last_post_time'])) < intval($board_config['flood_interval']))
				{
					message_die(GENERAL_MESSAGE, $lang['Flood_Error']);
				}
			}
		}
	}

	if ($mode == 'editpost')
	{
		remove_search_post($post_id);
	}

	if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post']))
	{
		$topic_vote = (!empty($poll_title) && count($poll_options) >= 2) ? 1 : 0;

		$sql  = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
		}

		if ($mode == 'newtopic')
		{
			$topic_id = $db->sql_nextid();
		}
	}

	$edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
文章遮蔽外掛修改之第二個地方-->	$sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig , hideit) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig , $post_hideit)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig, hideit = $post_hideit " . $edited_sql . " WHERE post_id = $post_id";<--結束
	if (!$db->sql_query($sql, BEGIN_TRANSACTION))
	{
第270行錯誤區段-->		message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);<--第270行結束
	}

	if ($mode != 'editpost')
	{
		$post_id = $db->sql_nextid();
	}

	$sql = ($mode != 'editpost') ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message',  bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id";
	if (!$db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
	}

	add_search_words('single', $post_id, stripslashes($post_message), stripslashes($post_subject));

	//
	// Add poll
	// 
	if (($mode == 'newtopic' || ($mode == 'editpost' && $post_data['edit_poll'])) && !empty($poll_title) && count($poll_options) >= 2)
	{
		$sql = (!$post_data['has_poll']) ? "INSERT INTO " . VOTE_DESC_TABLE . " (topic_id, vote_text, vote_start, vote_length) VALUES ($topic_id, '$poll_title', $current_time, " . ($poll_length * 86400) . ")" : "UPDATE " . VOTE_DESC_TABLE . " SET vote_text = '$poll_title', vote_length = " . ($poll_length * 86400) . " WHERE topic_id = $topic_id";
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
		}
文章遮蔽外掛修改到的有兩個程式區段\r
錯誤訊息是在第270行
怪的是~這個檔案中共有八個程式區段都與第270行一樣\r


麻煩前輩幫我看看!感謝!

PS:
剛在竹貓星球發表文章時怪怪的,不能顯示出顏色也!所以只好改成文字表示!
●架設主機作業系統:Linux
●我的上網方式:ADSL (中華電信)
●我安裝的程式:PHP:5.4.38 + MySQL:5.5.36-cll-lve
●我的 phpBB 版本:phpBB (3.1.3)
shinwella
星球普通子民
星球普通子民
文章: 15
註冊時間: 2005-06-28 19:45

文章 shinwella »

將文章遮蔽外掛重新安裝過後,已經解決了!
●架設主機作業系統:Linux
●我的上網方式:ADSL (中華電信)
●我安裝的程式:PHP:5.4.38 + MySQL:5.5.36-cll-lve
●我的 phpBB 版本:phpBB (3.1.3)
主題已鎖定

回到「phpBB 2 安裝與使用」