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.真的不知道是怎么回事。