Verify your comment

Verify your comment

As a final step before posting your comment, enter the letters and numbers you see in the image below.

This test is used to prevent automated robots from posting comments.

Oh dear. How many times have I clicked submit on a Typepad blog comment form and moved on to the next site only to accidentally come back hours later and discover the CAPTCHA waiting for me?

I don’t think I’ve lost a comment yet, but they could have put the CAPTCHA on the same page as the comment form. If that’s impossible, the comment form should warn the visitor that a second page needs to be filled out. It’s not rocket science.

WordPress MU 1.2.5

A new release of WordPress MU, the multi-user, multi-blog version of WordPress is now available.

This is a security release to address issues brought to our attention by Alexander Concha who I must thank for his unfailing patience while we sorted out this release.

Edit: this release is based on WordPress 2.2.3. Unfortunately a last minute bug crept in where post titles looked like post slugs when viewed on your blog. I quickly rolled together a new minor release, 1.2.5a which has an updated wpmu-functions.php. The download page has been updated too. If you have already updated your install, all you have to do is go to this page and download a new wpmu-functions.php and place it in your wp-includes directory. Apologies for the mix up!

Edit 2: I forgot to mention yesterday that a lot of the functions that were in the files in mu-plugins/ have been moved into wp-includes/wpmu-functions.php so move those files out of the way if you get errors about functions already existing. As stated previously on the forum, kses.php is synced with the one in WordPress which means class and id will be stripped from posts. If you’re happy for your users to use the class and id tag attributes then the following function will come in handy. Put it in mu-plugins/kses.php where it will be activated automatically.

function addabitofclass( $tags ) {
    global $allowedposttags;
    foreach( $allowedposttags as $tag => $attr ) {
        $attr[ 'class' ] = array();
        $attr[ 'id' ] = array();
        $allowedposttags[ $tag ] = $attr;
    }
    return $allowedposttags;
}
add_filter( 'edit_allowedposttags', 'addabitofclass' );

The observant among you will notice I forgot to assign the result of the filter in wp-includes/kses.php. This has since been fixed but it was too late for this release. Making it a global in the function above was a suitable work around.

Middle click your urls again in Firefox 2

One of the really useful features of Firefox in the past was the ability to click the middle mouse button anywhere on a browser page and have the URL in the clipboard load in that window. For some reason it stopped working some time back and I don’t know why. Here’s how to enable it again if your Firefox has stopped obeying your middle finger.

  • Open “about:config” in a new browser tab or window.
  • Search for “middlemouse” and find “middlemouse.contentLoadURL”. Set it to true if it’s false.
  • If that preference isn’t there, create a new one by right clicking and creating a new boolean value. Type “middlemouse.contentLoadURL” into the box and press return.
  • A new value, set to true by default, will be created.
  • Now try copying a URL and middle-clicking it anywhere on this page. Try http://ocaoimh.ie/ for good luck!

Google Reader's improved subscription notice

One of the first things I did when I started using Google Reader was finding the bookmarklet to make subscribing to feeds easier. Unfortunately the first few times I used it I didn’t realise I had to click the “Subscribe” button in the Reader interface. It was hidden away in the top right of the page. I was too busy looking at the feed contents to notice it.

Tom and others have pointed out that Reader added a search feature but this “You are not subscribed yet” warning is a nice usability improvement that I haven’t seen anyone mention yet.

Google Reader Subscribe notice

Luciano Pavarotti has sung his last

Luciano Pavarotti died in the early morning of September 6, 2007 at home surrounded by his wife and four daughters.

I got a bit of a shock this morning looking through my feeds when I saw Pat’s post that Pavarotti died. The Wikipedia page on him has already been updated with more details. A sad day for his family, friends, fans and the music world.

luciano-pavarotti.png

Is your eAccelerator cache dir still there?

While looking through this WordPress performance post I realised that eAccelerator might not be running properly on this blog. For some time I’ve noticed this site hasn’t been as quick off the mark as it used to be. Dare I say it, but it was even a little sluggish!

If you’re not familiar with it, eAccelerator is a PHP accelerator. It caches PHP bytecode and performs optimizations to make your PHP site run a lot faster.

I verified that eAccelerator was loaded and then checked my php.ini configuration. Sure enough, the eaccelerator.cache_dir directive was set to “/tmp/eacc/” and that directory was deleted the last time my server rebooted.

A permanent fix is to change the location of the cache dir. Put it anywhere the webserver can read, but don’t put it in /tmp/.

While you’re looking at eAccelerator, upgrade to the latest version, especially if you’re running PHP5.

gmail: no third-party DSNs

Be careful if you forward email to a gmail account. Gmail doesn’t like receiving mail delivery status notices or reports. This server filled up overnight with tens of thousands of email reports bouncing back and forth between it and gmail. If you emailed me in the last 24 hours and I haven’t replied, I may not have received it (yet).

postfix/cleanup[12107]: 9FE58326C1: reject: header Content-Type: multipart/report; report-type=delivery-status;??boundary=”A507733AD3.1188834275/mail.ocaoimh.ie” from local; from=<donncha_@_ocaoimh.ie> to=<xxxx@gmail.com>: no third-party DSNs

I really haven’t had any luck with email recently …

How I fixed everything

  • First of all I disabled the forward to my gmail accounts by moving .procmailrc out of the way.
  • Then I deleted a lot of log files to make more breathing space for everything and watched the mail spool into my mail file.
  • That was taking too long so I shutdown Postfix and went into /var/spool/postfix/ and into the active, incoming and maildrop folders where I moved every file with the string “Undelivered Mail Returned to Sender” out of the way:

    for i in `grep "Undelivered Mail Returned to Sender" * -rl`; do mv $i /tmp/xxx/ -vi; done

  • After restoring the .procmailrc, I restarted Postfix and lots of legitimate email started flowing again!
  • I added the following recipe to my .procmailrc which I hope will stop bounced messages getting to Google:

    :0:
    * ^Subject: Undelivered Mail Returned to Sender
    POSTMASTER.txt

What caused the problem in the first place? A bounced email from Yahoo. Someone left a comment with a fake email address, subscribed to the post and when another comment was left on that post the subscription email bounced. It’s worked before fine so I’m not sure why Google are complaining now! Over 2GB of bounced mail. My poor server.

Update! It happened again but I stopped Postfix at 9.5MB free on the filesystem and this time I found out what went wrong. I implemented these Postfix rules Justin blogged about without running Spamassassin. Well, I used to run SA but then when I started using Gmail I stopped, which is probably why I didn’t see this earlier. Not Justin’s fault, my own for playing with fire!

Idiot spammers

This comment was posted automatically using Blog Comment Poster. Check out its site to learn more and start building backlinks to your websites today.

This post was written manually using Donncha’s fingers. Check out the Akismet anti comment-spam plugin to stop the idiot spammer at 75.126.132.23 using “Blog Comment Poster”.