[問題]安裝 custom_mass_pm_1.4.7em 的錯誤訊息求教[已解決]

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

版主: 版主管理群

主題已鎖定
頭像
james0215
星球普通子民
星球普通子民
文章: 22
註冊時間: 2005-04-29 21:21

[問題]安裝 custom_mass_pm_1.4.7em 的錯誤訊息求教[已解決]

文章 james0215 »

問題外掛:custom_mass_pm_1.4.7em
參考連結:http://phpbb-tw.net/phpbb/viewtopic.php ... om+mass+PM

安裝完成後到了後台設定權限出現這樣的訊息,我有對照過367行附近的修改,跟修改說明上沒有發現差異,想請大家幫幫忙......

代碼: 選擇全部

一般錯誤
Could not update group

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 'WHERE group_id = 28' at line 3

UPDATE phpbb_groups SET group_type = 0, group_name = '版面管理員', group_description = '', group_moderator = 3, group_allow_pm = '5', WHERE group_id = 28

Line : 367
File : admin_groups.php 
我先將367行前後貼上來,如果不夠請告訴我再貼其他,以節省版面....

代碼: 選擇全部

if ( !($result = $db->sql_query($sql)) )
				{
					message_die(GENERAL_ERROR, 'Failed to obtain current group moderator info', '', __LINE__, __FILE__, $sql);
				}

				if ( !($row = $db->sql_fetchrow($result)) )
				{
					$sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending)
						VALUES (" . $group_id . ", " . $group_moderator . ", 0)";
					if ( !$db->sql_query($sql) )
					{
						message_die(GENERAL_ERROR, 'Could not update group moderator', '', __LINE__, __FILE__, $sql);
					}
				}
			}

			$sql = "UPDATE " . GROUPS_TABLE . "
				SET group_type = $group_type, group_name = '" . str_replace("\'", "''", $group_name) . "', group_description = '" . str_replace("\'", "''", $group_description) . "', group_moderator = $group_moderator, group_allow_pm = '$group_allow_pm',
				WHERE group_id = $group_id";
			if ( !$db->sql_query($sql) )
			{
	第367行	message_die(GENERAL_ERROR, 'Could not update group', '', __LINE__, __FILE__, $sql);
			}
	
			$message = $lang['Updated_group'] . '<br /><br />' . sprintf($lang['Click_return_groupsadmin'], '<a href="' . append_sid("admin_groups.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');;

			message_die(GENERAL_MESSAGE, $message);
		}
		else if( $mode == 'newgroup' )
		{
			$sql = "INSERT INTO " . GROUPS_TABLE . " (group_type, group_name, group_description, group_moderator, group_allow_pm, group_single_user) 
				VALUES ($group_type, '" . str_replace("\'", "''", $group_name) . "', '" . str_replace("\'", "''", $group_description) . "', $group_moderator, '$group_allow_pm',	'0')";
			if ( !$db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, 'Could not insert new group', '', __LINE__, __FILE__, $sql);\r
			}
			$new_group_id = $db->sql_nextid();

			$sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending)
				VALUES ($new_group_id, $group_moderator, 0)";
			if ( !$db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, 'Could not insert new user-group info', '', __LINE__, __FILE__, $sql);
			}
			
			$message = $lang['Added_new_group'] . '<br /><br />' . sprintf($lang['Click_return_groupsadmin'], '<a href="' . append_sid("admin_groups.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');;

			message_die(GENERAL_MESSAGE, $message);
在此拜託了...........

謝謝
最後由 james0215 於 2005-06-30 20:31 編輯,總共編輯了 1 次。
●主機作業系統:Win xp pro sp2
●架站程式:Appserv v2.5.3
●上網方式:ADSL 固I,Hinet 2M/512K
●安裝程式:Apache + php + MySql
●phpBB2版本:phpBB 2.0.15
●phpBB2連結網址:尚無\r
●安裝的外掛:
跑馬燈公告版本1.0 By: Martinet Oaf , Admin Userlist 202 , attach_mod 2312 , Announces Suite 302
Split topic type 201 , Fading Links 202 , Configurable Smilies Table 1.0.0
Who Viewed A Topic103 , No subject line in replys , 主題類型 , 強制主題類型
ADV_TOP5 , Custom mass PM 1.4.7 , EasyMOD 020a , BBCode Scroll Marquee 1.2
●使用的風格:subsilver
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8547
註冊時間: 2004-04-30 01:54
來自: Taiwan

文章 心靈捕手 »

To james0215:

應該是您在加入語法時, 在 WHERE 前面多了一個" ,"
以下的修改試試看:
#
#-----[ Find ]-----
#
$sql = "UPDATE " . GROUPS_TABLE . "
SET group_type = $group_type, group_name = '" . str_replace("\'", "''", $group_name) . "', group_description = '" . str_replace("\'", "''", $group_description) . "', group_moderator = $group_moderator, group_allow_pm = '$group_allow_pm',
WHERE group_id = $group_id";

#
#-----[ Replace With ]-----
#
$sql = "UPDATE " . GROUPS_TABLE . "
SET group_type = $group_type, group_name = '" . str_replace("\'", "''", $group_name) . "', group_description = '" . str_replace("\'", "''", $group_description) . "', group_moderator = $group_moderator, group_allow_pm = '$group_allow_pm'
WHERE group_id = $group_id";
施比受有福,祝福您好運! ^_^
歡迎光臨★★心靈捕手★★ :: 討論區
https://wang5555.dnsfor.me/phpBB3/
頭像
james0215
星球普通子民
星球普通子民
文章: 22
註冊時間: 2005-04-29 21:21

文章 james0215 »

謝謝心靈捕手再一次伸出援手... :-)
我照您上述的位置改了,還是出現錯誤訊息,

代碼: 選擇全部

Could not update group

DEBUG MODE

SQL Error : 1054 Unknown column 'group_allow_pm' in 'field list'

UPDATE phpbb_groups SET group_type = 0, group_name = '版面管理員', group_description = '', group_moderator = 3, group_allow_pm = '2' WHERE group_id = 28

Line : 367
File : admin_groups.php
只是原本的這個

代碼: 選擇全部

SQL Error : 1064 Unknown
與後來的有點變化

代碼: 選擇全部

SQL Error : 1054 Unknown
我猜應改跟修改下列這部份有關吧\r
#
#-----[ FIND ]------------------------------------------------
#
$sql = "INSERT INTO " . GROUPS_TABLE
VALUES (

#
#-----[ IN-LINE FIND ]----------------------------------------
#
, group_moderator

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, group_allow_pm

#
#-----[ IN-LINE FIND ]----------------------------------------
#
, $group_moderator

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, '$group_allow_pm'
請您再幫我看一看好嗎....
謝謝
●主機作業系統:Win xp pro sp2
●架站程式:Appserv v2.5.3
●上網方式:ADSL 固I,Hinet 2M/512K
●安裝程式:Apache + php + MySql
●phpBB2版本:phpBB 2.0.15
●phpBB2連結網址:尚無\r
●安裝的外掛:
跑馬燈公告版本1.0 By: Martinet Oaf , Admin Userlist 202 , attach_mod 2312 , Announces Suite 302
Split topic type 201 , Fading Links 202 , Configurable Smilies Table 1.0.0
Who Viewed A Topic103 , No subject line in replys , 主題類型 , 強制主題類型
ADV_TOP5 , Custom mass PM 1.4.7 , EasyMOD 020a , BBCode Scroll Marquee 1.2
●使用的風格:subsilver
~倉木麻衣~
竹貓忠實會員
竹貓忠實會員
文章: 1405
註冊時間: 2004-03-21 21:00

文章 ~倉木麻衣~ »

james0215 寫:謝謝心靈捕手再一次伸出援手... :-)
我照您上述的位置改了,還是出現錯誤訊息,
Could not update group

DEBUG MODE

SQL Error : 1054 Unknown column 'group_allow_pm' in 'field list'

UPDATE phpbb_groups SET group_type = 0, group_name = '版面管理員', group_description = '', group_moderator = 3, group_allow_pm = '2' WHERE group_id = 28

Line : 367
File : admin_groups.php
未知的欄位名稱 group_allow_pm
你沒執行必要的SQL變更檔吧
頭像
james0215
星球普通子民
星球普通子民
文章: 22
註冊時間: 2005-04-29 21:21

文章 james0215 »

哎呀呀....改碼改到昏頭\r
竟然檔案copy了卻在最後遺忘了前頭看過這樣的內容
## 1.1 SQL commands are not performed
## -----------
## This MOD need a database update.
## Then, in any case if you install this MOD manually or using
## an alpha release of EM, please copying the *_db_update.php
## in your phpBB root directory, run it with your navigator,
## and then delete it from the phpBB root directory.
真是疏忽了...該罰
我先喝三杯致歉兩位......
●主機作業系統:Win xp pro sp2
●架站程式:Appserv v2.5.3
●上網方式:ADSL 固I,Hinet 2M/512K
●安裝程式:Apache + php + MySql
●phpBB2版本:phpBB 2.0.15
●phpBB2連結網址:尚無\r
●安裝的外掛:
跑馬燈公告版本1.0 By: Martinet Oaf , Admin Userlist 202 , attach_mod 2312 , Announces Suite 302
Split topic type 201 , Fading Links 202 , Configurable Smilies Table 1.0.0
Who Viewed A Topic103 , No subject line in replys , 主題類型 , 強制主題類型
ADV_TOP5 , Custom mass PM 1.4.7 , EasyMOD 020a , BBCode Scroll Marquee 1.2
●使用的風格:subsilver
主題已鎖定

回到「外掛問題討論」