For the last 5 days or so, I've been experiencing the biggest spam flood I've ever had, going at the steady rate of about one spam comment every 15 seconds, which ends up making quite big numbers by the end of the day.

I almost could not care, having here on this blog 3 lines of defense against the evil spammers :

  • a simple yet very efficient referrer spam check (yes, I know, I said I would release it months ago, it's still on my todo list, I swear :)
  • Bad Behavior, which is blocking known robots from even accessing the site
  • Akismet, a comment analysis whose job is to determine if a submitted comment is legit or crap

I almost could not care, but the thing is, the moderation queue gets hammered with spam comments, and the spam queue gets filled quicker than I can clean it. By the time I wrote these few lines, 30 new spams got caught by Akismet. And if Akismet ever goes down for a second, 10 comments make it through.

So, here enters a fourth line of defense against spam : Spamquiz, a simple plugin Marco made a few months ago and that I preciously kept here till the day I would feel I need it. Didn't work with WP 2.x it seems. However, I found a little plugin which looks really really neat : Did you pass maths ?. Hope it has some benefits. At least it'll make real commenters use their brain a bit before they can post :)

I've started to play a bit with Xdebug, a PHP extension that's designed to provide profiling information for PHP scripts and script execution analysis, amongst other things. This is fun, this is interesting, and this is invaluable when you really want to optimize the last bits of a script or a function.

My test install is running XAMPP on Windows, and activation is dead easy since the precompiled php_xdebug.dll is bundled with the PHP distribution. Installation on any other system shouldn't be really harder anyway, assuming you have access to the php.ini file and can add some extensions to PHP

With XAMPP for Windows, you just have to add the following to your php.ini (usually located in xampp/apache/bin)

  1. zend_extension_ts = "C:\path\to\xampp\php\extensions\php_xdebug.dll"

Then add something like the following section. I haven't really tuned this yet, these are mostly default and "do everything you can do" options.

  1. [xdebug]
  2. xdebug.auto_trace = 1
  3. xdebug.collect_includes = 1
  4. xdebug.collect_params = 1
  5. xdebug.collect_return = 1
  6. xdebug.default_enable = 1
  7. xdebug.extended_info = 1
  8. xdebug.show_local_vars = 0
  9. xdebug.show_mem_delta = 1
  10. xdebug.trace_format = 1
  11. xdebug.trace_options = 0
  12. xdebug.trace_output_dir ="C:\path\to\xampp\tmp"
  13. ; Remote
  14. xdebug.remote_enable=1
  15. xdebug.remote_mode="req"
  16. xdebug.remote_host=127.0.0.1
  17. xdebug.remote_port=17869
  18. xdebug.idekey=<idekey>
  19.  
  20. ; Mode 1
  21. xdebug.remote_handler="gdb"
  22. xdebug.auto_profile = 1
  23. xdebug.auto_profile_mode = 2
  24. xdebug.output_dir = "C:\path\to\xampp\tmp"
  25.  
  26. ; Mode 2
  27. xdebug.remote_handler="DBGp"
  28. xdebug.profiler_enable = 1
  29. xdebug.profiler_output_dir = "C:\path\to\xampp\tmp"
  30. xdebug.profiler_output_name = "debug.out"
  31.  
  32. xdebug.dump.SERVER = REMOTE_ADDR,REQUEST_METHOD

Now, don't forget to restart or reload the Apache so changes can apply. Result of this ? Whenever you run a PHP script, a trace file is created in the tmp directory, containing informations about how many times a function was called, how many milliseconds it took, and such.

The file itself is not very human readable, and on Windows you need WinCacheGrind, a freeware viewer for files generated by xdebug.

For instance, check this screenshot for the kind of results that a front page call on WordPress produces. It makes spotting suspiciously CPU greedy functions a trivial task, can help you understand the code flow and can give hints on how optimize your code.

Pixel Icons: 340 free pretty mini tiny neat icons. (0) «
Nothing cool on TV ? Watch the whole Ali G collection on Youtube. Respect ! I is laughing so hard with me friends !
(3) «

A few months ago, Tim Yang and I released a 3 columns theme for WordPress, Problogger Clean.

For the last two or three months, Tim Yang has been experiencing various host and ISP problems, and as of today, the theme is no longer available from its "official" location. I've been asked several times for a download link, which I don't have at the moment, sorry folks.

I will try to provide an alternate mirror of the theme, once I'll put my hands on the latest version available. Sorry for those who wanted to try this great theme, stay tuned :)

In: , On: 2006 / 04 / 11 Short URL: http://ozh.in/ci

Une question d'ordre juridique dans le cadre d'un projet que j'ai en tête me taraudait sévèrement l'esprit depuis quelques semaines (et, en gros, conditionne le dit projet). J'avais besoin d'un avis juridique éclairé, par exemple celui d'un avocat spécialisé dans les "NTIC" comme ils disent, stadire dans l'internet et sujets relatifs.

J'ai eu cet avis juridique auprès de Maitre Blandine Poidevin, avocate au Barreau de Lille, qui m'a reçu à son cabinet et m'a gracieusement consacré 20 minutes de son temps pour répondre à mes interrogations. Et en plus, elle a l'air sympa comme tout cette dame. Et son blog est très bien. Non, je suis pas amoureux, je suis infiniment reconnaissant. Merci, merci mille fois, Maitre.

whois.sc moves / merges with another site. The best tool ever for domain registrants gains some features, but I miss its simplicity :/ (1) «
Gridgame.swf: This popular and addictive pointless little flash game once hosted on deviantart seems to have almost disappeared from the internet. Doh. I mirrored it here for my own boredom moments: gridgame.swf. (0) «
Homagod. Simply named Guitar, this version of Pachelbel’s soapy Canon is awesome. So awesome that already 2.5 millions saw it and it’s been featured in the NY Times. And as usual, I’m late on this kind of stuff everybody already knows :) (1) «

Tonight I was reading some mail at work, quite tired after a long week of hard duty (heh), and I came across some regular Sourceforge alert about some package I'm monitoring.

The mail said that phpBB2 was upgrading again. And I thought : oh, please, not again. Not again one of those ubercumbersome upgrade I'll have to run just because they found yet another severe exploit in their overbloated stuff.

I guess I was indeed really tired, because a few seconds later I just remembered that… hey, I ditched phpBB2 a few months ago ! Indeed, a few months ago, I moved a community forum I'm maintaining to punBB. It was a painless operation and something I should have done years ago.

Anyway, remembering tonight my dropping phpBB2 really made the end of my day :)