Blog Comments Problem Solved博客評論解決問題
Simple Thoughts Blog簡單的思考博客 had a sporadic but consistent comment problem.進行了零星的,但一致的評論的問題。 On submitting comments a blank page was occasionally returned instead of the original page with the comment added.對提交的評論一個空白頁是偶爾返回而不是原來的網頁與評論。 How did I debug it?如何,我調試它呢?
First I wanted to reproduce the error consistently.首先,我要重現錯誤一貫。 I could very rarely see this error with my Firefox browser, possibly because I remain logged in most of the time and/or cookies.我可以很少看到這個錯誤與我的Firefox瀏覽器,這可能是因為我仍然記錄在大部分的時間和/或Cookie 。 So I opened Internet Explorer and cleared the cache.因此,我打開Internet Explorer和清除緩存。 I created a test post and started adding comments.我創建了一個測試後,並開始加入評論。
I was lucky.我很幸運。 The bug was consistently reproducible in Internet Explorer.錯誤是一貫重現在Internet Explorer中。 All I had to do was refresh as post page (posting to wp-comments.php) and a blank page would be returned.所有我要做的就是重新整理後的網頁(發帖可濕性粉劑- comments.php )和一個空白頁將被送回。 My first job was done.我的第一份工作是做的。
BTW: In the process I discovered a stupid bug in WordPress’ implementation of first time moderation.的BTW :在這個過程中我發現愚蠢的錯誤在WordPress執行第一次溫和。 It is purely email based.這純粹是基於電子郵件。
Next I had to go in the code to find out the exact location of the error in wp-comments.php.接下來,我已去,在該守則,以找出確切位置的誤差在可濕性粉劑- comments.php 。 However before I did that I wanted to remember which plugins hooked into wp-comments.不過之前,我這樣做我想記得插件鉤到可濕性粉劑-評論。 The only one was唯一一個被 wp-hashcash可濕性粉劑- hashcash , an excellent ,一個很好的 comment spam prevention垃圾評論的預防 plugin.插件。
So before going further I disabled the plugin.因此,前進一步而言殘疾人士的插件。
Voila, the error was gone. voila ,錯誤是沒有了。 I was using a really old version of the plugin, probably 1.5.我是用一個真正的舊版本的插件,可能是1.5 。 So I tried upgrading.因此,我試圖升級。 However it started spewing strange database errors.不過,開始噴湧奇怪的數據庫錯誤。 So I decided to keep it disabled for now.所以我決定以保持其禁用。
Now my blog is more vulnerable to comment spammers.現在我的博客更容易評論垃圾郵件發送者。 However it will not prevent legitimate commentators from commenting anymore.但它不會阻止合法的評論家評論了。
Thanks goes to感謝去 James Huff詹姆斯吞吐 , who kindly pointed me to this error for the second or third time. ,誰善意地指出我這個錯誤,為第二次或第三次。 I couldn’t let it pass anymore thinking it was only occasional or postpone it for the next version of the site.我不能讓它通過了思想,它只是偶爾或推遲,這為下一版本的網站。
Filed under提起下 CMS Software CMS軟件 , , Computer Security計算機安全 , , Firefox火狐 , , Headline News頭條新聞 , , How To如何 , , Internet Explorer Internet Explorer中 , , Open Source Software開放源碼軟件 , , Pro Blogging贊成Blogging , , Tech Note技術說明 , , Web網頁 , , Web Services Web服務 , , WordPress在WordPress | |
| |
RSS 2.0 2.0 | |
Email this Article電子郵件此文章
You may also like to read您也可以想讀 |




February 22nd, 2006 at 11:58 am 2006年2月22日在上午11時58分
I noticed the same strange database errors when using the 3.0 beta version of hashcash..我注意到,同樣的奇怪的數據庫錯誤時,使用3.0測試版的hashcash ..
so now you are not using hashcash at all?所以現在您使用的不是hashcash在所有?
doesnt that mean you will get a flood of comment spam?的doesn't意思,你將獲得一個氾濫的垃圾評論?
I am not sure now what I should use as a spam prevention solution..我不知道現在我應該使用作為一個垃圾郵件預防解決方案.. maybe I should go back to the older version of hashcash..也許我應該回去舊版本的hashcash ..
February 22nd, 2006 at 12:27 pm 2006年2月22日在下午12時27分
No. I have stopped using HashCash.號我已停止使用hashcash 。 I still have first comment moderation on.我還有第一評論審閱。 So hopefully (unless the spammer uses the exploit mentioned in this post) I will get a chance to moderate the comments before it appears on the site.所以希望(除非垃圾郵件發送者使用的利用中提到的這個職位) ,我會獲得機會,以溫和的評論之前,它出現在網站上。
If I start getting too many spams, as before, I will opt for Bad Behavior plugin.如果我開始收到太多垃圾郵件,一如以往,我會選擇不良行為插件。 I have heard good words about it from James Huff aka MacManx.我所聽到的好話約從詹姆斯吞吐又名macmanx 。
February 22nd, 2006 at 1:07 pm 2006年2月22日在下午1時07分
I have been using我一直使用 Bad Behavior不良行為 for almost a year now.近一年來,現在。 It’s an excellent plugin and very effective at stopping bandwidth-wasting and email-harvesting bots as well as comment and trackback spam bots.它的一個很好的插件和非常有效的制止帶寬浪費和電子郵件收穫機器人,以及評論和跟踪防垃圾郵件程序。 Since the developer of Bad Behavior is never pleased by false positives, some spam comments do pass by its defenses.由於開發商的不良行為,是從來沒有感到高興的假陽性,一些垃圾郵件的評論通過其防。 Once WordPress 2.0 was released about two months ago, I decided to add一旦在WordPress 2.0被釋放大約兩個月前,我決定要添加 Akismet akismet as a second layer of spam protection, and MacManX.com has been 100% spam-free ever since.作為第二層垃圾郵件防護,以及macmanx.com已100 %的垃圾郵件免費至今。
February 22nd, 2006 at 1:23 pm 2006年2月22日在下午1時23分
> Bad Behavior is never pleased by false positives, some spam comments do pass by its defenses >不良行為,是從來沒有感到高興的假陽性,一些垃圾郵件的評論通過其防
I would support the Bad Behavior approach of focussing on eliminating false positives at the cost of letting few spams through.我會支持不良行為的做法,集中討論消除假陽性,在成本,讓幾個垃圾郵件通過。 It is better than the overly aggresive approch of SpamKarma.這是優於過於咄咄逼人的途徑的spamkarma 。
So Bad Bahavior it is then如此惡劣bahavior ,這是當時的
February 22nd, 2006 at 1:33 pm 2006年2月22日在下午1時33分
Good choice!不錯的選擇!
I should also mention that I have received absolutely no false positives during the past two months in which I have been using both Bad Behavior and Akismet.我還應提到,我收到了,絕對沒有假陽性在過去兩個月中,我一直使用不良行為和akismet 。 So, if you ever get tired of managing your moderation list, try adding Akismet to your mix.因此,如果你以往任何時候都得到厭倦管理您的溫和名單,嘗試加入akismet到您的組合。
February 22nd, 2006 at 10:28 pm 2006年2月22日在下午10時28分
James,詹姆斯,
Thanks.謝謝。
I have two issues with Akismet.我有兩個問題與akismet 。
Firstly I do not fall under their narrow definition of non-commercial blog首先,我不屬於他們的狹隘的定義,非商業博客
Secondly I somehow feel hesitant to hand over the control of my comments to third-party.其次i覺得有點猶豫,交出控制我的意見,以第三黨。 Just from an architectural point it appears incorrect.單從建築角度看來,不正確。
February 23rd, 2006 at 1:17 pm 2006年2月23日在下午1時17分
I am not sure why, but I chmoded the file wp-hashcash.key to 666 and the database errors seem to be gone and I can access all my blogs pages fine now..我不知道為什麼,但我chmoded檔案可濕性粉劑- hashcash.key ,以666和數據庫的錯誤似乎是經歷了,我可以訪問所有我的Blog頁面的罰款,現在..
I may use bad behavior eventually but I am a bit concerned about it blocking legitimate bots like google and yahoo etc.我可以使用不良行為,但最終我感到有點關心阻塞合法程序一樣, Google和雅虎等。
February 23rd, 2006 at 5:40 pm 2006年2月23日在下午5時40分
Angsuman, you make $500 or more per moth off of Simple Thoughts?!由Angsuman ,你500元或以上,蛾小康簡單的思考嗎! You lucky blogger.你幸運的Blogger 。 As for third-party control, there really isn’t much there.至於第三黨的控制,實在是沒有太大的存在。 The Akismet server evaluates each incoming comment for spam content.該akismet服務器評估每個傳入的評論為垃圾郵件的內容。 Comments marked as “spam” by the plugin are still stored in your database for fifteen days and viewable in a log interface.評論標示為“垃圾郵件”由插件仍儲存在您的數據庫為15天,並檢視在一個日誌接口。 If you find a comment incorrectly marked as “spam”, just hit the “not spam” button to post it on your blog and submit to Akismet for re-evaluation and system education, and visa-versa for any spam comments that get past the plugin.如果您發現發表評論錯誤地標記為“垃圾郵件” ,只需點擊“不是垃圾郵件”按鈕後在你的博客上,並提交akismet為重新評價和系統的教育,簽證,反之亦然任何垃圾郵件的評論認為,得到過去插件。 Architecturally, Akismet seems like the best available anti-spam solution.建築, akismet好像現有的最佳反垃圾郵件解決方案。 The effect of the community contribution to the spam evaluating engine leads to comment spam floods being stopped across the internet in a matter of seconds.影響社會的貢獻,垃圾郵件的評價引擎,導致垃圾評論的洪水正在全面停止在互聯網上的問題秒。 According to the Akistmet engine, there have been “4,242,796 spams caught so far, 63,824 so far today, [and] 81% of all comments are spam.” But, if you can’t or don’t want to use Akismet, Bad Behavior and a good moderation list should keep you spam-free.根據該akistmet引擎,有“ 4242796垃圾郵件捕獲直至目前為止, 63824到目前為止,今天, [和] 81 %的所有意見都是垃圾郵件。 ”但是,如果你不能或不想用akismet ,壞行為和良好的溫和名單應讓您的垃圾郵件免費。
Thomas, Bad Behavior shouldn’t be blocking any well-established and properly-coded legitimate bots.托馬斯,不良行為不應該阻止任何建立了良好的和適當的編碼的合法程序。 Bad Behavior compares existing legitimate bots to their IPs and known behavior patterns.不良行為相比,現有的合法程序,以他們的IPS和已知的行為模式。 For example, Bad Behavior will block a bot with the Googlebot user agent only if it came from a non-Google IP and/or it is not following the Googlebot’s behavior pattern.舉例來說,不良行為將A座的BOT與Googlebot的用戶代理,只有當它來自一個非Google的IP和/或它是不以下了Googlebot的行為模式。 If you are concerned, just check Bad Behavior’s log each day.如果您擔心,只要勾選不良行為的記錄每一天。 For more information, look for the commented fields inside each of Bad Behavior’s files.如需詳細資訊,看看為評論領域內的每一個不良行為的檔案。
February 23rd, 2006 at 11:03 pm 2006年2月23日在下午11時03分
James,詹姆斯,
Shh shh
Though I have to admit things are slowing down a bit for unknown reasons.雖然我不得不承認,事情是放緩了一點,原因不明。
You have convinced me wrt.你有我確信wrt 。 Akismet. akismet 。 I will definitely try it.我一定會嘗試。
BTW: I noticed after eliminating wp-hashcash, I have started getting lots of legitimate comments.的BTW :我注意到後,消除可濕性粉劑- hashcash ,我已開始使用大量的合法的意見。 It appears wp-hashcash was eating (due to the bug you found) much more than just illegitimate comments.看來,可濕性粉劑- hashcash是吃(因錯誤的,你發現)更不僅僅是非法的評論。
February 24th, 2006 at 11:20 am 2006年2月24日在上午11時20分
Just wanted to give you a heads up..只是想給你一個元首起來.. at 12:17 PM eastern time I got a “cannot connect to database error” when trying to access your page..在下午12時17分東部時間我得到一個“無法連接到數據庫錯誤” ,當試圖訪問您的網頁..
probably just a fluke but thought i should let you know可能只是一個福祿克,但認為我應該讓您知道
February 24th, 2006 at 12:35 pm 2006年2月24日在下午12時35分
Thomas,托馬斯,
Thanks for the heads-up.感謝首長跟進。
Best,最好的,
Angsuman由Angsuman
July 7th, 2006 at 11:22 pm 2006年7月7日在下午11時22分
There’sa new release of Bad Behavior out which should address your issue of false positives, especially from various South Asian countries (it has a strict mode, which you want to disable to allow this traffic).有新版本的不良行為哪應該解決您的問題的假陽性,尤其是從各種南亞國家(它有一個嚴格的模式,您想要停用,讓這個交通) 。
Combined with Akismet, you should no longer see 3000 spams a day結合akismet ,您應該再也看不到3000垃圾郵件1天
July 7th, 2006 at 11:51 pm 2006年7月7日在下午11時51分
Thanks Michael.感謝邁克爾。 I will try it out.我會嘗試去。
February 3rd, 2007 at 11:41 am 2007年2月3日在上午11時41分
I’ve found that Akismet gives that blank page error on posting now (with WP 2.0.7).我發現akismet讓認為,空白頁的錯誤,現在就張貼(可濕性粉劑2.0.7 ) 。 The Akismet guys said they addressed the bug, but the new version still gives me the same problem.該akismet傢伙說,他們討論了錯誤,但新版本仍然使我有同樣的問題。
Re-enabling Akismet even after it’s been deactivated reveals the spams that have been coming in and that it’s trapping them even though the plugin is disabled, which is almost a miracle!重新啟用akismet ,甚至後,它的被停用,揭示了垃圾郵件已在和未來,它的誘捕他們,即使插件是殘疾人士,這幾乎是一個奇蹟! Moreover, it revealed several false positives that I had to de-spam…此外,它揭示了幾個假陽性,我不得不德-垃圾郵件…
Really not sure what’s going on.真的不知道是怎麼回事。