1 頁 (共 3 頁)

[問題]文章太長,無法 po[尚待解決]

發表於 : 2004-11-25 20:15
sh85216s
如貼上"[教學] phpBB 2.0.11 多國語言修正"會出現\r
Error in posting

請教大家.

發表於 : 2004-11-25 20:34
神川小羽
你是說在文章內貼上 *.TXT 的內容嗎?
這樣的話不算很長耶~~

發表於 : 2004-11-25 20:39
sh85216s
哦,抱歉沒說清楚!
整篇的文章.

發表於 : 2004-11-25 20:41
神川小羽
痾 這篇文章的內容很短阿\r
就這樣而已捏 sh85216s大大 是不是弄錯篇文嚕?
在2.0.8A上的測試 正常
http://pb.idv.tw/phpBB2/viewtopic.php?t=867
2.0.11上測試 正常
http://pb.idv.tw/Flyff/viewtopic.php?p=73

發表於 : 2004-11-25 20:49
sh85216s
沒錯呀!
之前 2.0.10 未升級成 2.0.11 時是可以 Po 的,不過昨天.....不小心把未升級前的備份檔給刪了!! 哈哈,現在已無退路了,只好上來求救,希望好心人伸出援手!

發表於 : 2004-11-25 20:52
神川小羽

發表於 : 2004-11-25 20:56
sh85216s
哦!那是幫朋友架的,
敝站

看了您的站覺得非常欽佩正在努力學習當中,請多多幫忙!

另:我在這裡貼的時候發現前半段是 OK 的,後半段包在 Code 的部份出問題

發表於 : 2004-11-25 21:15
神川小羽
這個唷 我想應該是 語法上的衝突 我家也是這樣子 @@"
http://pb.idv.tw/phpBB2/viewtopic.php?p=1915#1915
在竹貓也會出現 語法上的衝突 用Code包起來也是沒有作用的@@
所以通常他們 都是打包成文字檔@@ 天霜他家(休站中)
之前也是因為 某些文章的語法的關聯 所以 特定的文字 像空格 這樣的問題

但是竹貓的可以貼@@"

我想問題應該是在這裡吧\r
找到那篇修改文件的內容拿掉旁邊的[ ]
#
#-----[ REPLACE WITH 替換 ]----------------------------------------
# code 標籤內的某些中文字變成 ?#91; ?#93; ?#123; ?#125; 問題
#

發表於 : 2004-11-25 21:28
sh85216s
感謝大力協助!
希望有解決的方法,期待中.

對了,我只是個學習者,請別再稱呼我"大大",再次感謝!!

發表於 : 2004-11-25 21:34
神川小羽
發表會出現\r
Error in posting
這個原因 我不知道是啥密 有可能是升級的時候動到啥密了吧\r
試試看先備份posting.php 然後拿一個原始的去覆蓋 在發表看看


Code會失效的看上篇

發表於 : 2004-11-26 07:41
sh85216s
神川小羽 寫: 我想問題應該是在這裡吧\r
找到那篇修改文件的內容拿掉旁邊的[ ]
#
#-----[ REPLACE WITH 替換 ]----------------------------------------
# code 標籤內的某些中文字變成 ?#91; ?#93; ?#123; ?#125; 問題
#
確實如您所說,這個部份已經OK.

另:在2.0.11下無法 po 文的部份將在檢查看看,多謝幫忙!!

發表於 : 2004-11-26 08:41
sh85216s
神川小羽 寫:發表會出現\r
Error in posting
這個原因 我不知道是啥密 有可能是升級的時候動到啥密了吧\r
試試看先備份posting.php 然後拿一個原始的去覆蓋 在發表看看
試過了還是一樣!!

另:不要全貼,大略貼一半是 OK 的!!

發表於 : 2004-11-26 08:43
Martinet
把Error in posting時..
出現的錯誤訊息po出來吧= =a

總不可能只有error in posting吧~phpBB不是這樣設計的(笑

發表於 : 2004-11-26 08:48
sh85216s
剛剛打開除錯模式

得到錯誤的訊息如下:

代碼: 選擇全部

  
Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near 'add_poll_option_text'])));[/code:1:9d4fb5ed01] # #-----[ REPLACE WITH 替換' at line 1

INSERT INTO phpbb_posts_text (post_id, post_subject, bbcode_uid, post_text) VALUES (567, '', '9d4fb5ed01', 'Error in posting 下載檔案: [url]http://myweb.hinet.net/home6/riot/Multi-Language_Fix_2.0.11.txt[/url] # #-----[ OPEN 打開 ]------------------------------------------------ # posting.php # #-----[ FIND 尋找 ]------------------------------------------------ #618 列 [code:1:9d4fb5ed01]$poll_options = array();[/code:1:9d4fb5ed01] # #-----[ BEFORE ADD 之前, 加上 ]------------------------------------ # 預覽標題、預覽後欄框文章內容及標題、投票議題 # [code:1:9d4fb5ed01] $subject = ereg_replace("&","&",$subject); $message = ereg_replace("&","&",$message); $poll_title = ereg_replace("&","&",$poll_title);[/code:1:9d4fb5ed01] # #-----[ FIND 尋找 ]------------------------------------------------ #633 列 [code:1:9d4fb5ed01]$poll_options[$option_id] = htmlspecialchars(trim(stripslashes($option_text)));[/code:1:9d4fb5ed01] # #-----[ REPLACE WITH 替換 ]---------------------------------------- # 預覽之後的投票選項 (option)、增加選項之後的舊選項、更新選項 # [code:1:9d4fb5ed01]$poll_options[$option_id] = ereg_replace("&","&",htmlspecialchars(trim(stripslashes($option_text))));[/code:1:9d4fb5ed01] # #-----[ FIND 尋找 ]------------------------------------------------ #640 列 [code:1:9d4fb5ed01]$poll_options[] = htmlspecialchars(trim(stripslashes($HTTP_POST_VARS['add_poll_option_text'])));[/code:1:9d4fb5ed01] # #-----[ REPLACE WITH 替換 ]---------------------------------------- # 新增投票選項之後欄框裡面的選項內容 # [code:1:9d4fb5ed01]$poll_options[] = ereg_replace("&","&",htmlspecialchars(trim(stripslashes($HTTP_POST_VARS['add_poll_option_text']))));[/code:1:9d4fb5ed01] # #-----[ OPEN 打開 ]------------------------------------------------ # includesfunctions_post.php # #-----[ FIND 尋找 ]------------------------------------------------ #152 列 [code:1:9d4fb5ed01]$subject = htmlspecialchars(trim($subject));[/code:1:9d4fb5ed01] # #-----[ REPLACE WITH 替換 ]---------------------------------------- # 發表之後的主題標題 # [code:1:9d4fb5ed01]$subject = ereg_replace("&","&",htmlspecialchars(trim($subject)));[/code:1:9d4fb5ed01] # #-----[ FIND 尋找 ]------------------------------------------------ #179 列 [code:1:9d4fb5ed01]$poll_title = htmlspecialchars(trim($poll_title));[/code:1:9d4fb5ed01] # #-----[ REPLACE WITH 替換 ]---------------------------------------- # 發表之後的投票議題 # [code:1:9d4fb5ed01]$poll_title = ereg_replace("&","&",htmlspecialchars(trim($poll_title)));[/code:1:9d4fb5ed01] # #-----[ FIND 尋找 ]------------------------------------------------ #331 列 [code:1:9d4fb5ed01]$option_text = str_replace("''", "''", htmlspecialchars($option_text));[/code:1:9d4fb5ed01] # #-----[ AFTER, ADD 之後, 加上 ]------------------------------------ # 發表之後的投票選項 (2.0.4 起新產生的問題) # [code:1:9d4fb5ed01]$option_text = str_replace("&","&", $option_text);[/code:1:9d4fb5ed01] # #-----[ OPEN 打開 ]------------------------------------------------ # includesusercp_register.php # #-----[ FIND 尋找 ]------------------------------------------------ #108 列 [code:1:9d4fb5ed01]$$var = trim(htmlspecialchars($HTTP_POST_VARS[$param]));[/code:1:9d4fb5ed01] # #-----[ REPLACE WITH 替換 ]---------------------------------------- # 使用者名稱 (2.0.4 起新產生的問題) # [code:1:9d4fb5ed01]$$var = str_replace("&","&",trim(htmlspecialchars($HTTP_POST_VARS[$param])));[/code:1:9d4fb5ed01] # #-----[ OPEN 打開 ]------------------------------------------------ # includesbbcode.php # #-----[ FIND 尋找 ]------------------------------------------------ # [code:1:9d4fb5ed01]$curr_pos = strpos($text, "[", $curr_pos);[/code:1:9d4fb5ed01] # #-----[ REPLACE WITH 替換 ]---------------------------------------- # 引言修正 # http://phpbb-tw.net/phpbb/viewtopic.php?p=102297#102297 # [code:1:9d4fb5ed01] if ( ord(substr($text, $curr_pos, 1)) > 0xa0 ) { $curr_pos += 2; continue; } else if ( substr($text, $curr_pos, 1) != '[' ) { $curr_pos++; continue; }[/code:1:9d4fb5ed01] # #-----[ FIND 尋找 ]------------------------------------------------ #483 列 [code:1:9d4fb5ed01]$code_entities_match = array('#<#', '#>#', '#"#', '#:#', '#\[#', '#\]#', '#\(#', '#\)#', '#\{#', '#\}#'); $code_entities_replace = array('<', '>', '&', ':', '[', ']', '(', ')', '{', '}');[/code:1:9d4fb5ed01] # #-----[ REPLACE WITH 替換 ]---------------------------------------- # code 標籤內的某些中文字變成 ?#91; ?#93; ?#123; ?#125; 問題 # [code:1:9d4fb5ed01]$code_entities_match = array('#<#', '#>#', '#"#', '#:#', '#\(#', '#\)#'); $code_entities_replace = array('<', '>', '&', ':', '(', ')');[/code:1:9d4fb5ed01] # #-----[ OPEN 打開 ]------------------------------------------------ # adminadmin_users.php # #-----[ FIND 尋找 ]------------------------------------------------ #219 列 [code:1:9d4fb5ed01]$username = ( !empty($HTTP_POST_VARS['username']) ) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['username']))) : '';[/code:1:9d4fb5ed01] # #-----[ REPLACE WITH 替換 ]---------------------------------------- # [code:1:9d4fb5ed01]$username = ( !empty($HTTP_POST_VARS['username']) ) ? ereg_replace("&","&",trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['username'])))) : '';[/code:1:9d4fb5ed01] # #-----[ FIND 尋找 ]------------------------------------------------ #285 列 [code:1:9d4fb5ed01]$location = htmlspecialchars(stripslashes($location)); $occupation = htmlspecialchars(stripslashes($occupation)); $interests = htmlspecialchars(stripslashes($interests)); $signature = htmlspecialchars(stripslashes($signature));[/code:1:9d4fb5ed01] # #-----[ REPLACE WITH 替換 ]---------------------------------------- # [code:1:9d4fb5ed01]$location = ereg_replace("&","&",htmlspecialchars(stripslashes($location))); $occupation = ereg_replace("&","&",htmlspecialchars(stripslashes($occupation))); $interests = ereg_replace("&","&",htmlspecialchars(stripslashes($interests))); $signature = ereg_replace("&","&",htmlspecialchars(stripslashes($signature)));[/code:1:9d4fb5ed01] # #-----[ FIND 尋找 ]------------------------------------------------ #708 列 [code:1:9d4fb5ed01]$username = htmlspecialchars(stripslashes($username));[/code:1:9d4fb5ed01] # #-----[ REPLACE WITH 替換 ]---------------------------------------- # [code:1:9d4fb5ed01]$username = ereg_replace("&","&",htmlspecialchars(stripslashes($username)));[/code:1:9d4fb5ed01] # #-----[ FIND 尋找 ]------------------------------------------------ # [code:1:9d4fb5ed01]$location = htmlspecialchars(stripslashes($location)); $occupation = htmlspecialchars(stripslashes($occupation)); $interests = htmlspecialchars(stripslashes($interests)); $signature = htmlspecialchars(stripslashes($signature));[/code:1:9d4fb5ed01] # #-----[ REPLACE WITH 替換 ]---------------------------------------- #719 列 [code:1:9d4fb5ed01]$location = ereg_replace("&","&",htmlspecialchars(stripslashes($location))); $occupation = ereg_replace("&","&",htmlspecialchars(stripslashes($occupation))); $interests = ereg_replace("&","&",htmlspecialchars(stripslashes($interests))); $signature = ereg_replace("&","&",htmlspecialchars(stripslashes($signature)));[/code:1:9d4fb5ed01] # #-----[ FIND 尋找 ]------------------------------------------------ #741 列 [code:1:9d4fb5ed01]$location = htmlspecialchars($this_userdata['user_from']); $occupation = htmlspecialchars($this_userdata['user_occ']); $interests = htmlspecialchars($this_userdata['user_interests']);[/code:1:9d4fb5ed01] # #-----[ REPLACE WITH 替換 ]---------------------------------------- # 從管理控制台編輯會員資料時,來自、 職業、 興趣三個欄位的多國文字顯示問題 # [code:1:9d4fb5ed01] $location = ereg_replace("&","&",htmlspecialchars($this_userdata['user_from'])); $occupation = ereg_replace("&","&",htmlspecialchars($this_userdata['user_occ'])); $interests = ereg_replace("&","&",htmlspecialchars($this_userdata['user_interests']));[/code:1:9d4fb5ed01] # #-----[ OPEN 打開 ]------------------------------------------------ # includes/functions.php # #-----[ FIND 尋找 ]------------------------------------------------ # (2.0.11 起新產生的問題) [code:1:9d4fb5ed01]$username = htmlspecialchars(rtrim(trim($username), "\\\"));[/code:1:9d4fb5ed01] # #-----[ REPLACE WITH 替換 ]---------------------------------------- # [code:1:9d4fb5ed01]$username = ereg_replace("&","&",htmlspecialchars(trim(trim($username), "\\\")));[/code:1:9d4fb5ed01] # #-----[ SAVE/CLOSE ALL FILES 儲存/關閉所有檔案 ]------------------- # # EoM 外掛修正結束')

Line : 302
File : /var/www/html/phpBB208a/includes/functions_post.php
請幫忙診斷一下!!

忘了貼網址

發表於 : 2004-11-26 08:51
Martinet
裝Mod裝錯...

居然把一大堆不該複製的都複製進去了..當然會錯= =a

仔細看一下裝Mod教學吧...

套句少林足球的話...「外掛不是這樣裝的~」


XD