thoughton:digitallife banner
about downloads imagery work
-- Site News --

Comment closure


This site has been experiencing a sudden upsurge in comment spam over the last week or so. I puzzled over it for a while before realising that I had upgraded this site from Movable Type 3.16 to 3.35 recently. A couple of test comments later I had established that the upgrade had broken my SCode installation. Pretty bloody annoying, to say the least. Unfortunately it doesn't seem to be fixable, and furthermore there appears to be no working captcha solution for MT 3.3+, so commenting will be closed while I investigate the options.

Incidentally while trying to fix this I discovered that last year Arvind Satyanarayan had updated James Seng's original SCode 0.1c (which I was using until last week) to work with MT3.2 and re-christened it SCode 1.0, however after installing it today I am forced to conclude that it was broken by the introduction of MT 3.3. In any case it is irrelevant, since the new versions is now no longer supported by Arvind. Unfortunately you have to jump through a few hoops (email registration) to get to the plugin download page and when you do finally arrive there is no mention (despite several prominent PayPal donation buttons :P ) of this useful information.
Posted on 22 June 2007, to Site News
| TrackBacks (0)
-- Apple --

MacBook Pro battery growing pains


A few days ago I noticed my 9-month-old MacBook Pro seemed to be wobbling slightly while I was typing. Since I use the laptop on my dining table I initially thought I had trapped either a coaster or the power lead underneath. However after a quick investigation I discovered that my battery was bulging out from the bottom of the machine! It might not be that obvious in my blurry photos, but it's the white pouch inside the battery that has expanded and forced the cover upwards.
Mbp Battery1-1
Mbp Battery2-1
Mbp Battery3-1
Given the recent reports of a spectacular MacBook battery failure I decided the prudent course would be to operate the laptop solely on mains power for a while!
Posted on 16 March 2007, to Apple | Site News | Technology
| TrackBacks (0)
-- Internet --

MT SpamLookup report card


Since installing SpamLookup 104 days ago this site has been completely free of trackback spam. In that time SpamLookup has blocked 297 trackback spams. Of those there was 1 false positive (apologies to inaniloquent.com, but your ping IP didn't match your site IP). There was also one angry young man. Pretty damn good if you ask me.
Posted on 3 October 2005, to Internet | Site News | Web Design
| TrackBacks (0)
-- Bereft of Reason --

One angry young man


Had an interesting comment on this site today, from someone identifying himself as 'El Mexicano' with the email address of chico@chipala.com. This fellow posted this comment from the 207.248.240.119 IP address, which resolves to a Mexican IP address governed by LACNIC, the Latin American and Caribbean IP address Regional Registry. The address is dynamic, but I have noted the IP address, the date and time in case I need to report him.

"Why report him?", I hear you say. Well, that's a long story. It began about ten hours earlier when this character started an automated script to flood this site with trackbacks advertising online poker. The first hit was at six o'clock this morning :
207.248.240.119 - - [14/Jul/2005:06:03:19 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=181 HTTP/1.1" 200 8615 "http://www.sportscribe.com/play-party-poker-for-fun.html" "Mozilla/4.0 (compatible; MSIE 4.01; Windows NT Windows CE)"
There is then a lull for several hours, then a new wave of attacks started. Notice the identical IP and the constantly changing User Agent and entry IDs:
207.248.240.119 - - [14/Jul/2005:13:09:54 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=225 HTTP/1.1" 200 8915 "http://www.yachtdurak.com/poker-games.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 3.0)"
207.248.240.119 - - [14/Jul/2005:13:27:51 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=12 HTTP/1.1" 200 8568 "http://www.yachtdurak.com/pacific-poker.html" "Mozilla/4.0 (compatible; MSIE 4.01; Mac_PowerPC)"
207.248.240.119 - - [14/Jul/2005:13:29:29 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=168 HTTP/1.1" 200 8561 "http://www.yachtdurak.com/party-poker.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 3.0)"
207.248.240.119 - - [14/Jul/2005:13:35:20 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=208 HTTP/1.1" 200 8571 "http://www.yachtdurak.com/texas-holdem.html" "Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 5.11 [en]"
207.248.240.119 - - [14/Jul/2005:13:35:25 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=66 HTTP/1.1" 200 8570 "http://www.yachtdurak.com/poker-games.html" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
207.248.240.119 - - [14/Jul/2005:13:45:46 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=199 HTTP/1.1" 200 8559 "http://www.yachtdurak.com/free-poker.html" "Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)"
207.248.240.119 - - [14/Jul/2005:14:30:53 +0100] "GET /digitallife/ HTTP/1.1" 200 23920 "-" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.8&41; Gecko/20050511 Firefox/1.0.4"
At about two o'clock in the afternoon this angry young fella started to probe this site, apparently looking for an administrator login screen. He tried to access directories at /upload/, /test/ and /tim/admin/. At least he's read enough of this site to find out my name! :)

He then returns to the automated script attack (does he not get the hint?):
207.248.240.119 - - [14/Jul/2005:06:03:19 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=181 HTTP/1.1" 200 8615 "http://www.sportscribe.com/play-party-poker-for-fun.html" "Mozilla/4.0 (compatible; MSIE 4.01; Windows NT Windows CE)"
207.248.240.119 - - [14/Jul/2005:13:09:54 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=225 HTTP/1.1" 200 8915 "http://www.yachtdurak.com/poker-games.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 3.0)"
207.248.240.119 - - [14/Jul/2005:13:27:51 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=12 HTTP/1.1" 200 8568 "http://www.yachtdurak.com/pacific-poker.html" "Mozilla/4.0 (compatible; MSIE 4.01; Mac_PowerPC)"
207.248.240.119 - - [14/Jul/2005:13:29:29 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=168 HTTP/1.1" 200 8561 "http://www.yachtdurak.com/party-poker.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 3.0)"
207.248.240.119 - - [14/Jul/2005:13:35:20 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=208 HTTP/1.1" 200 8571 "http://www.yachtdurak.com/texas-holdem.html" "Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 5.11 [en]"
207.248.240.119 - - [14/Jul/2005:13:35:25 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=66 HTTP/1.1" 200 8570 "http://www.yachtdurak.com/poker-games.html" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
But wait! He's not done. Mr Angry now starts trying from several different IP addresses. If I was using MTBlackList this might be a problem. But I'm not, I'm using something else so he's outta luck:
148.244.150.58 - - [14/Jul/2005:13:35:28 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=18 HTTP/1.1" 200 8550 "http://www.yachtdurak.com/empire-poker.html" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
Here's another IP:
200.106.160.70 - - [14/Jul/2005:13:41:34 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=126 HTTP/1.1" 200 8589 "http://www.yachtdurak.com/poker.html" "Mozilla/4.0 (compatible; MSIE 4.01; AOL 4.0; Windows 98&41;"
And another:
63.230.254.28 - - [14/Jul/2005:13:43:07 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=223 HTTP/1.0" 200 8601 "http://www.yachtdurak.com/texas-hold-em.html" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; N_o_k_i_a)"
And another:
63.230.254.29 - - [14/Jul/2005:13:44:50 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=31 HTTP/1.0" 200 8592 "http://www.yachtdurak.com/texas-holdem.html" "Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 5.11 [en]"
And another:
207.248.240.119 - - [14/Jul/2005:13:45:46 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=199 HTTP/1.1" 200 8559 "http://www.yachtdurak.com/free-poker.html" "Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)"
And another:
200.106.160.70 - - [14/Jul/2005:13:52:11 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=206 HTTP/1.1" 200 8593 "http://www.yachtdurak.com/empire-poker.html" "Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC; AtHome021)"
And another:
202.175.234.163 - - [14/Jul/2005:13:53:42 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=16 HTTP/1.1" 200 11192 "http://www.yachtdurak.com/party-poker.html" "Mozilla/4.0 (compatible; MSIE 5.0; YANDEX)"
And here's anoth... no, wait - he's already tried this IP:
200.106.160.70 - - [14/Jul/2005:14:01:30 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=150 HTTP/1.1" 200 8571 "http://www.yachtdurak.com/poker-rules.html" "Mozilla/4.0 (compatible; Opera/3.0; Windows 4.10) 3.51 [en]"
I've gotta hand it to him for persistence:
148.244.150.58 - - [14/Jul/2005:14:12:40 +0100] "GET /cgi-bin/mt-comments.cgi?entry_id=138 HTTP/1.1" 200 9004 "http://www.yachtdurak.com/free-poker.html" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; .NET CLR 1.0.3705)"
This continues for another 15 minutes or so. In total Mr Spamtastic makes 74 attempts.

Here is the moment when he finally gives up, and posts his comment manually:
207.248.240.119 - - [14/Jul/2005:14:35:03 +0100] "POST /cgi-bin/mt-comments.cgi HTTP/1.1" 302 - "http://thoughton.co.uk/cgi-bin/mt-comments.cgi" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.8&41; Gecko/20050511 Firefox/1.0.4"
I have since deleted his comment, but here's a sample: Mad Spammer

Do you think he's a little annoyed? :D The poor fella took the time to post 77,148 (yes, seventy seven thousand) smilies!

Interestingly enough, this evening I received 7 unsolicited emails asking me to confirm my subscription to random mailing lists. Obviously I deleted them rather than confirm anything, but I'd bet my last dollar that this is the work of the same angry young man. He really must be peeved off about his inability to spam this site to go to all this effort! Bless his cotton socks. :)
-- Site News --

Comment subscription


After some research into the subject, including a fruitless attempt to get EZ Subscribe to Comments working, I have installed MT-Notify. Installation is easy, but modifying the existing template to match this site was tricky due to the single massive unified template it uses for each and every dynamically-generated page.
Posted on 28 June 2005, to Site News | Web Design
| TrackBacks (0)
-- How To... --

MT SpamLookup


Despite having recently checked Six Apart's plugin directory for Trackback management plugins, I somehow missed SpamLookup until I read a brief blog entry on it tonight. Installation is a case of simple drag and drop and everything seems to be working smoothly.
Posted on 21 June 2005, to How To... | Site News | Web Design
| TrackBacks (0)
-- How To... --

SCode reinstalled, GD issue solved


During the relocation of this site to Register1's hosting service an issue cropped up with James Seng's MT-Scode. The scodetest.cgi script was failing due to a missing GD.pm. Register1 were very helpful and had GD.pm installed within a couple of hours of my first email. However GD still refused to function - the SCode numbers weren't being drawn. From the http error log:

[Fri May 13 18:46:04 2005] [error] [client 81.151.xxx.xxx] Premature end of script headers: mt-scode.cgi
[Fri May 13 18:46:04 2005] [error] [client 81.151.xxx.xxx] /usr/bin/perl: relocation error: /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi/auto/GD/GD.so: undefined symbol: gdFontGetGiant
[Fri May 13 18:54:38 2005] [error] [client 81.151.xxx.xxx] gd-png: fatal libpng error: Invalid number of colors in palette
[Fri May 13 18:54:38 2005] [error] [client 81.151.xxx.xxx] gd-png error: setjmp returns error condition
After a dead end or two, Aaron & Isaac Goldberg provided the vital clue - it appeared to be a problem with the server's GD installation.

Despite just having spent a fair amount of time on my GD.pm problem, Register1 enthusiastically started investigating the new problem. They weren't running CPanel so the Goldbergs' cleangd advice didn't apply. Nevertheless Register1 solved the problem two days later without any further prompting, and the previously-broken SCode installation suddenly started working. They explained how they fixed it:

We had to downgrade the version of GD from 2.23 to 2.11 and use a pre-compiled Perl-GD rpm available from Redhat as opposed to a self-compiled version.

SCode was the one stumbling block to a complete migration to Register1's servers. With that solved, this site's old address is now officially defunct, and all traffic is being redirected to thoughton.co.uk/digitallife/

Comment
Register1's support has been nothing short of outstanding throughout this episode. Email replies were very quick - often within an hour. On one occasion, having just sent off a half-past-midnight email inquiry, a reply arrived at 1am! A great personal service - I've only been with them for a week but they are looking like the perfect hosts. Highly recommended, and very reasonably priced as well. They are also currently offering a "3 years for the price of 2" deal.


Posted on 16 May 2005, to How To... | Internet | Site News
Comment on this entry
-- Site News --

Server move


This site is now hosted by Register1, a UK-based hosting service. I chose them after reading many recommendations at the overclockers.co.uk forums. Migrating has not been totally hiccup-free, but Register1's support has been nothing short of outstanding.


Posted on 16 May 2005, to Internet | Site News
-- How To... --

Upgrade to Tiger, PHP and MySQL broken


I quickly noticed after upgrading to OS X 10.4 that PHP includes were not executing and MySQL queries were once again producing the dreaded 'cannot connect' error message which 10.3.9 had introduced:
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
:evil: Fixing the broken PHP was easy. I simply installed Mark Liyange's PHP 5.0.4 package. Tiger ships with 4.3.10.

For the MySQL error, for reasons I have not yet looked into the previous solution (repairing the ownership of the /usr/local/mysql/data folder) did not fix the problem. And trying to load mysqld in the Terminal showed that it not have permission to access the /usr/local/mysql/data folder. Since changing its ownership to the 'mysql' user did not help, I tried changing to it my user account instead (in my case the command was sudo chown -R thoughton data/.) Bingo, that did the trick! Everything works again. :)

A word of caution, this is just a quick fix while learning the ins and outs of Tiger, I wouldn't be surprised if doing this has opened up some huge security hole - so do it at your own risk and always keep a backup.
Posted on 27 April 2005, to How To... | Mac OS X | Site News
Comment on this entry
-- How To... --

MySQL broken by 10.3.9?


I noticed today that my MySQL install seemed to have broken. I was getting an error when I tried to post a new entry via Ecto, and after poking around a bit I discovered that any query involving the mysql database (such as a site search) produced the same error:

Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Further investigation seemed to indicate this was a permissions problem. The only thing I've installed recently has been the OS X 10.3.9 update, so I'm guessing it happened then. After much googling I found the fix.

Change directory to your mysql directory:

cd /usr/local/mysql

And enter this change ownership command:

sudo chown -R mysql data/

And voila! Everything works again.


Posted on 21 April 2005, to How To... | Internet | Mac OS X | Site News
-- Internet --

2 megabit


2 megabit MenuMeters Despite the fact that it took British Telecom 3 weeks instead of 1 to reconnect me, and despite the fact that they are giving out speed upgrades to everyone (so no matter what they say it isn't really 'compensation'), I'm still smilin' 8)


Posted on 8 April 2005, to Internet | Site News
-- Site News --

Back online, sort of


I'm back on broadband, so this site should usually be accessible again. The usually is because I do not yet have a desk, so the laptop sometimes gets put to sleep and put behind the couch! Until I find a safe place to leave it running overnight I'm afraid this sorry state of affairs will continue...


Posted on 6 April 2005, to Site News
-- Site News --

Downtime


This site will be unavailable for up to a week, while I move house :)


Posted on 11 March 2005, to Site News
Comment on this entry
-- Internet --

Trackback spammers try their luck


Over the last couple of days this site has had something in the region of 200 trackback spams proclaiming the wonders of online gambling. It's actually quite a refreshing change to have some spam again after 10 weeks of being spam free.

After doing a little research, it appears there is no reliable way to block trackback spam whilst allowing legitimate trackbacks, but given their relative unimportance turning off trackbacks for all previous entries appears to be a no-brainer. Clearly the mere fact that someone else is linking to this site is the important point, the trackback's main purpose (* see below) seems to be providing an ego-boosting acknowledgment of that link.

* The argument that trackback serves as a sort of 'continuing the discussion elsewhere' signpost could conceivably be an argument to keep trackback, were it not for the fact that the vast majority of trackbacks are the blogosphere's equivalent of UseNet "me too" posts.

Update: Phil Ringnalda wrote an insightful article on this subject.


Posted on 2 February 2005, to Internet | Site News | Web Design
Comment on this entry
-- How To... --

Googlescript Searches


I read a useful Google hack recently - the following link opens a Javascript window:

Javascript:void(q=prompt('Type%20in%20the%20search%20term:')); if(q)void(location.href='http://www.google.com/search?q='+escape(q))

Click the link and type in your search term. When you click 'OK' it takes you to the Google results page for your search term. What's that you say? Not very inspiring so far? Well, how about this -

Using just a little knowledge of the way Google searches you can search web directories:

Javascript:void(q=prompt('Type%20in%20the%20type%20of%20file%20here:')); if(q)void(location.href='http://www.google.com/search?client=googlet&num=100&q=intitle%3A%22index%20of%20/%22%20%22'+escape(q)+'%22')

Or you can specify a particular file type (in this case I've used .mp3, you can replace it with .ogg or .avi or whatever takes your fancy ;) ):

Javascript:void(q=prompt('Type%20the%20name%20of%20the%20MP3:')); if(q)void(location.href='http://www.google.com/search?client=googlet&num=100&q=intitle%3A%22index%20of%20/%22%20%22'+escape(q)+'%22%20mp3')

Of course, despite the title of this post, this tip isn't restricted to Google - my favorite use of this technique is the search term below which I cobbled together to enable me to quickly search this blog:

Javascript:void(q=prompt('Search%20Digital%20Life%20the%20OS%20X%20way:')); if(q)void(location.href='http://thoughton.co.uk/cgi-bin//mt-search.cgi?IncludeBlogs=1&search='+escape(q))

Note that there should be no spaces in the above code snippets.

One great use of this method is to place a button in your Bookmarks bar:
Search button


Posted on 11 January 2005, to How To... | Internet | Site News
-- Site News --

Normal Service Will Now Resume


I've been away on holiday in Hong Kong over the new year, and typically there was a power outage back at home on or around Christmas day. This caused my broadband modem to disconnect which for some reason caused mNo-Ip X to lock up, thus resulting in this site being unavailable for about a week :( I am investigating the cause of the glitch, but in the meantime please accept my apologies for the downtime.


Posted on 3 January 2005, to Site News
-- How To... --

Smilies in Movable Type


Using Brad Choate's MTMacro plugin I've enabled smilies on this site :)

All I did was install the plugin as per the instructions, and then put a bunch of smilies inside a smilies folder (inside my icons folder).

Then I inserted this code into the head of each template (and repeated it with modifications for each different smiley):

<MTMacroDefine name="smiley1" string=":) ">
<img src="<$MTBlogURL$>icons/smilies/biggrin.gif"
alt=":) " />
</MTMacroDefine>

Posted on 14 December 2004, to How To... | Internet | Site News | Web Design
Comment on this entry
-- Internet --

Related Entries in MT


I installed Adam Kalsey's Improved Related Entries System today. It's working great, except I'm having to go back and add keywords to some badly titled previous entries. Apologies if I accidentally re-pinged anyone - I forgot to turn off notifications in Ecto for the first entries I added keywords to.


Posted on 13 December 2004, to Internet | Site News | Web Design
-- Internet --

MT-Captcha report card


It has now been exactly 30 days since MT-Captcha was installed on this site. In that time this site has not seen a single spam comment. The previous month saw spam figures pass the 600 mark, so it would seem reasonable to call that a glorious debut! Thank you James!


Posted on 12 December 2004, to Internet | Site News | Web Design
Comment on this entry | TrackBacks (0)
-- Site News --

Another Movable Type Captcha


There's a simpler approach to a Movable Type Captcha here. Installing this looks like a breeze compared to installing James Seng's SCode, but this one will prove easier for spammers to eventually circumvent since there's no need for any character recognition to crack the security phrase.
Posted on 17 November 2004, to Site News | Web Design
| TrackBacks (0)
-- Apple --

Running Apache behind an Airport Express


In order to reduce the number of wires I have to connect to my laptop I recently picked up an Airport Express. Setting it up to stream iTunes music to the stereo and print wirelessly to a USB printer were relatively painless, so I had high hopes for the device's third function - acting as a wireless internet router. However since the Airport Express only accepts ethernet network connections (the USB port is solely for printers), I needed to replace the free USB ADSL modem that comes with the BT Broadband service with a 'proper' ethernet ADSL modem. Based on nothing more than a solitary post by one guy reporting success with it in conjunction with an Airport Express (on some forgotten discussion forum otherwise I'd link it) I ordered the D-Link DSL-300T modem.

Easy setup
Once the modem arrived I simply attached it to BT's ADSL microfilter using the supplied RJ-45 cable and to the Airport Express unit using the supplied ethernet cable. The modem's lights flashed a few times and the Airport Express's light went green. Apparently the Airport Express's primary function is the internet connection, because the light will flash an angry orange forever unless the unit is connected to the internet, even if you only bought it to stream music and print wirelessly. Once it was hooked up the Airport Express Setup program launched itself and led me through the extremely simple setup process. As soon as that was done I fired up Safari and to my delight I had wireless internet access.

Teething problems
However, as is so often the case, spending a short while exploring my new capabilities quickly showed one major flaw. I could not access this website! After some research it began to make sense. What used to be 'my' IP address was now the Airport Express's IP address, while the Airport Express was using DHCP to distribute private IPs to the client computer (my mac). After doing some research an Apple KnowledgeBase article entitled AirPort 4.0 Help: Can I use a web server on my network? finally shed some light on the subject. Since I don't have a static IP the first solution was ruled out, but the article contains a reference to achieving the same result by using what Apple calls port mapping (and what the rest of the world calls port forwarding).

This should work
I then found another Apple KnowledgeBase article AirPort 4.0 Help: Assigning IP addresses to devices on your AirPort network. This seemed to address my exact problem, so I fired up the Airport Admin Utility, chose to configure the Airport Express, and clicked on the Port Mapping tab. Here I mapped public port 80 to the private IP 10.0.1.201 port 80. I then opened the System preferences Network panel where I modified the Airport connection's TCP/IP settings to 'Manual' IPv4 configuration, IP Address 10.0.1.201, subnet mask 255.255.255.0, router 10.0.1.1, and the appropriate DNS servers for my ISP. None of this is very complicated, and it SHOULD work. But it didn't. I could still access the internet, but I couldn't access this website.

The clouds part?
After more research, and browsing through assorted forums, I finally discovered this post in the MacOSXHints forums. This looked like a working solution! Not only did the poster have the exact same modem as me, he was trying to do the same thing!

Maybe not
However, there's still something wrong. It took me a few minutes to figure where in the modem's web-based configuration controls I could set the modem to act as a bridge, but once I had it set I set the Airport Express to log in using PPPoE. Apparently if I can get the Airport Express to login then port mapping will work. However when I fire it all up I get an endless 'Looking for PPPoE hosts' message scrolling in the menubar! Annoying.

Temporary solution
DefaulthostWhile I think about it (never admit defeat!) I've switched to using the 'Enable Default Host' option in the Base Station Options (located under the Airport tab in the configuration page of Airport Admin Utility). By setting the empty field to 201 (so the IP address is 10.0.1.201) you are limited to only having one Mac accessible from the internet, but that's what I had with the old non-wireless connection anyway. It simply would have been nice to get the port mapping to work in the event of any further computers being added to the network.


Posted on 17 November 2004, to Apple | How To... | Site News
| TrackBacks (0)
-- How To... --

Installing MT-Captcha (aka SCode)


This site has recently started to attract spammers, extolling the virtues of viagra, cialis, and large penises in general. Since the Movable Type interface is relatively slow, deleting these spams has become a bit of a pain.

There are several methods of defence, ranging from simply removing the 'post message' button and forcing everyone to preview, to installing Jay Allen's MT-Blacklist, or a script which disables comments after a set period of time. Elise Bauer of the Learning Movable Type blog has an extensive description of the various approaches.

The best solution for minimal admin-interaction (i.e. the best solution for lazy folks like yours truly) appears to be James Seng's MT-Captcha, an MT plugin which adds a graphical security code which the commenter has to read and type in (thus defeating the automated spam bots). Apparently captcha stands for "Completely Automated Public Turing test to tell Computers and Humans Apart."

Fink hell
Unfortunately, in order to draw the images, MT-Captcha requires that you install the perl module gd. I had previously downloaded and attempted to install this using these instructions but got lost in a maze of dependencies and fink hell. However today I stumbled across a promisingly-titled document How To Install gd version 1.8.4 on Mac OSX on DarwinPorts!

However, this meant I had to install darwinports ...

Next up, DarwinPorts
I set about following the site's instructions:

% cd ~
% mkdir darwinports
% cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od login
% cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od co -P darwinports
% cd ~/darwinports/base
% ./configure
% make
% sudo make install

Unfortunately I hit a problem almost immediately. The second cvs command left me with this error:

cvs checkout: in directory darwinports:
cvs checkout: cannot open CVS/Entries for reading: No such file or directory
cvs [checkout aborted]: cannot write : No such file or directory

After a few minutes of Googling I discovered that this error was likely the result of already having a directory called darwinports (i.e. there is an mistake in the instructions). I removed the directory and tried the second cvs command again, and hey presto! Screenfuls of stuff scrolling past as darwinports downloads! This lasted several minutes on my half megabit ADSL.

Eventually it finished and I moved onto the next step. After switching directories as instructed I entered ./configure. Cue lots more scrolling, only to come to a premature end with this message:

Please install the X11 SDK packages from the Xcode Developer Tools CD
configure: error: Broken X11 install. No X11 headers

And then X11
Argh! I thought I had already installed XCode 1.1 back when I was getting tintin++ to work. Apparently I didn't install the X11 part of XCode. Popping in the XCode 1.1 CD confirmed that it was missing. A lengthy 35 minute install later (the last 1% of which took 15 minutes), I was back to the Terminal to try and configure darwinports again. This time ./configure went smoothly, and make and sudo make install both completed without incident.

Finally, gd
Now to install gd! Referring back to the How To Install gd version 1.8.4 on Mac OSX document, the first instruction was to type sudo port install gd. Naturally this didn't work (does any unix software work first time?) - 'port' was not recognised. Adding export PATH=$PATH:/opt/local/bin to my ~/.profile file fixed the problem. After a 5 minutes or so I ended up with a screen like this:

$ sudo port install gd
---> Fetching jpeg
---> Attempting to fetch jpegsrc.v6b.tar.gz from http://www.ijg.org/files
---> Verifying checksum(s) for jpeg
---> Extracting jpeg
---> Applying patches to jpeg
---> Configuring jpeg
---> Building jpeg with target all
---> Staging jpeg into destroot
---> Installing jpeg 6b_0
---> Activating jpeg 6b_0
---> Fetching libpng
---> Attempting to fetch libpng-1.2.6.tar.bz2 from http://voxel.dl.sourceforge.net/libpng
---> Verifying checksum(s) for libpng
---> Extracting libpng
---> Configuring libpng
---> Building libpng with target all
---> Staging libpng into destroot
---> Installing libpng 1.2.6_0
---> Activating libpng 1.2.6_0
---> Fetching gd
---> Attempting to fetch gd-1.8.4.tar.gz from http://www.boutell.com/gd/http/
---> Verifying checksum(s) for gd
---> Extracting gd
---> Applying patches to gd
---> Configuring gd
---> Building gd with target all
---> Staging gd into destroot
---> Installing gd 1.8.4_3
---> Activating gd 1.8.4_3

And that's it! gd is now installed.

Now onto MT-Captcha...
The instructions for installing MT-Captcha itself are quite simple. All you have to do is insert some code into your MT templates. However after making the necessary changes and rebuilding I got lots of these errors:

MT::App::Comments=HASH(0x815db34) print() on closed filehandle OUTFILE at lib/MT/SCode.pm line 5

This turned out to be incorrect permissions on my MT-Catchpa temporary folder. Setting the owner of that folder to www (UID 70) cured the rebuilding errors. However, my security code was still not appearing! According to James Seng if your image doesn't appear it is always related to your gd install. After much frustration I finally realised that my install was missing GD.pm! Seeing as how I know absolutely nothing about perl, I failed to appreciate that gd and GD.pm are two different things, and we need to install both.

Not just gd, GD.pm too
So, after some more googling, I found that GD.pm (version 2.17) can be found here. After downloading and expanding it, perl Makefile.PL resulted in hundreds of error messages:

GD.xs: In function `newDynamicCtx':
GD.xs:440: error: structure has no member named `gd_free'
GD.xs: In function `gd_cloneDim':
GD.xs:460: error: structure has no member named `alpha'
GD.xs:460: error: structure has no member named `alpha'
GD.xs:466: error: structure has no member named `thick'
GD.xs:466: error: structure has no member named `thick'
GD.xs: In function `XS_GD__Image_newFromPngData':
GD.xs:595: error: structure has no member named `gd_free'
GD.xs: In function `XS_GD__Image_newFromGdData':
GD.xs:614: error: structure has no member named `gd_free'
GD.xs: In function `XS_GD__Image_newFromGd2Data':
GD.xs:631: error: structure has no member named `gd_free'
GD.xs: In function `XS_GD__Image_newFromJpegData':
GD.xs:651: error: structure has no member named `gd_free'
GD.xs: In function `XS_GD__Image_newFromWBMPData':
GD.xs:676: error: structure has no member named `gd_free'
GD.xs: In function `XS_GD__Image_copyRotate90':
GD.xs:1189: error: invalid lvalue in assignment
GD.xs:1189: error: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_copyRotate180':
GD.xs:1210: error: invalid lvalue in assignment
GD.xs:1210: error: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_copyRotate270':
GD.xs:1231: error: invalid lvalue in assignment
GD.xs:1231: error: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_copyFlipHorizontal':
GD.xs:1252: error: invalid lvalue in assignment
GD.xs:1252: error: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_copyFlipVertical':
GD.xs:1273: error: invalid lvalue in assignment
GD.xs:1273: error: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_copyTranspose':
GD.xs:1294: error: invalid lvalue in assignment
GD.xs:1294: error: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_copyReverseTranspose':
GD.xs:1315: error: invalid lvalue in assignment
GD.xs:1315: error: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_rotate180':
GD.xs:1335: error: invalid lvalue in assignment
GD.xs:1335: error: invalid lvalue in assignment
GD.xs:1336: error: invalid lvalue in assignment
GD.xs:1336: error: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_flipHorizontal':
GD.xs:1353: error: invalid lvalue in assignment
GD.xs:1353: error: invalid lvalue in assignment
GD.xs:1354: error: invalid lvalue in assignment
GD.xs:1354: error: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_flipVertical':
GD.xs:1371: error: invalid lvalue in assignment
GD.xs:1371: error: invalid lvalue in assignment
GD.xs:1372: error: invalid lvalue in assignment
GD.xs:1372: error: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_stringFT':
GD.xs:2085: error: `gdFTStringExtra' undeclared (first use in this function)
GD.xs:2085: error: (Each undeclared identifier is reported only once
GD.xs:2085: error: for each function it appears in.)
GD.xs:2085: error: parse error before "strex"
GD.xs:2104: error: `strex' undeclared (first use in this function)
GD.xs:2108: error: `gdFTEX_LINESPACE' undeclared (first use in this function)
GD.xs:2112: error: `gdFTEX_CHARMAP' undeclared (first use in this function)
GD.xs:2114: error: `gdFTEX_Unicode' undeclared (first use in this function)
GD.xs:2116: error: `gdFTEX_Shift_JIS' undeclared (first use in this function)
GD.xs:2118: error: `gdFTEX_Big5' undeclared (first use in this function)
GD.xs:2140: warning: assignment makes pointer from integer without a cast
GD.xs: In function `XS_GD__Image_stringFTCircle':
GD.xs:2188: warning: assignment makes pointer from integer without a cast
GD.xs: In function `XS_GD__Font_DESTROY':
GD.xs:2353: warning: comparison between pointer and integer
GD.xs:2354: warning: comparison between pointer and integer
GD.xs:2355: warning: comparison between pointer and integer
GD.xs:2356: warning: comparison between pointer and integer
GD.xs:2357: warning: comparison between pointer and integer
GD.xs: In function `XS_GD__Font_Small':
GD.xs:2369: warning: assignment makes pointer from integer without a cast
GD.xs: In function `XS_GD__Font_Large':
GD.xs:2380: warning: assignment makes pointer from integer without a cast
GD.xs: In function `XS_GD__Font_Giant':
GD.xs:2391: warning: assignment makes pointer from integer without a cast
GD.xs: In function `XS_GD__Font_MediumBold':
GD.xs:2402: warning: assignment makes pointer from integer without a cast
GD.xs: In function `XS_GD__Font_Tiny':
GD.xs:2413: warning: assignment makes pointer from integer without a cast
make: *** [GD.o] Error 1

Reverting to GD.pm 1.33
This error totally stumped me. There's a thread here which discuses it along with a possible fix, but it might as well be Greek as far as I'm concerned! Finally I read a note here, which suggested that reverting to GD.pm version 1.33 would work on OS X. After a quick download of the older version, I was once again installing GD.pm as per the ReadMe file. This time, despite hundreds of make test errors, make install worked perfectly! A quick rebuild of the site and - wow, stop the presses! I virtually jumped out of my chair as the sweet sight of a graphical security code greeted my eyes!

PS: for perl idiots like myself, here is a useful command to see if GD is working:

perl -e "use GD"

If there are no errors then GD is working.

Back to reality
Alas, despite the appearance of my security numbers, all was not rosy. After turning off comment approval and posting a few test comments, it became rapidly apparent that the security code was not being checked at all. Any comment was accepted, no matter what number was input into the security code field! Back to the drawing board...

Finally, success!
After flailing around for a couple more hours, and reading every one of the 500 comments on the MT-Captcha page, I've finally figured it out. There is a typo in the ReadMe!!! Growl. The key passage is this:

+++++++++++++++++++++++++++++++++++
INSTALLATION MT 3.x
+++++++++++++++++++++++++++++++++++

From: http://www.setcomputing.com/blog/archives/computing/2004-September/incorporating_mtsecu.html

Follow Step 1 to 5 as above and then...

But this is wrong, wrong, wrong. What it should say is:

+++++++++++++++++++++++++++++++++++
INSTALLATION MT 3.x
+++++++++++++++++++++++++++++++++++

From: http://www.setcomputing.com/blog/archives/computing/2004-September/incorporating_mtsecu.html

Follow Step 1 to 7 as above and then...

Once I completed steps 6 and 7 from the MT 2.x instructions (editing Comments.pm and the templates), the security code check FINALLY started working. I'm on cloud nine! :-)


Posted on 14 November 2004, to How To... | Internet | Site News | Web Design
| TrackBacks (2)
-- Web Design --

Installing MT-Blacklist


I've been attempting to install Jay Allen's MT-Blacklist in order to help deal with comment spam. However, despite widespread acclaim I found this software quite badly documented and hard to install. The help forums were notably unhelpful - they are full of people requesting help and little to nothing in the way of answers. That said, this is free software and I suppose one can't expect too much.

After precisely following instructions and installing the software (including installing Storable.pm) I ended up with an error when I tried to load mt-bl-config.cgi ("Use of uninitialized value in concatenation (.) or string at /Library/WebServer/CGI-Executables/extlib/File/Spec/Unix.pm line 78."). According to Jay Allen this is a "superfluous perl warning". Whatever it is, MT-Blacklist simply doesn't work. No matter what I click, it takes me to a login page which doesn't allow any logins. Using my Movable Type login and password merely causes the page to reload. Interestingly, using any other login information results in a red box saying 'Invalid Login'. So obviously I am using the correct password information, there's just something broken in MT-Blacklist.

One of the suggestions in the help forums (in reply to someone else's problem) was to simply reinstall MT-Blacklist. I wasted a couple of hours and did so, only to get to the loading stage (running mt-bl-config.cgi) be greeted by a message to the effect that there were pre-existing MT-Blacklist entries in the MySQL database which needed to be removed. After spending a fruitless hour searching for an idiot's guide on command-line commands to drop tables from a MySQL database, I ended up installing phpMyAdmin following these instructions. After that ordeal trying to load phpMyAdmin resulted in this error: " The configuration file now needs a secret passphrase (blowfish_secret).". A quick google led me to this page where I found the solution. Finally, something that worked! Like so much other unix software, this whole ordeal has been a case of 'one step forward, two steps back.'

Unfortunately, after removing the old MySQL tables and reloading MT-Blacklist, I'm getting the exact same problem as before - no matter what I click I get taken to a non-responsive login page. As you can imagine, this is intensely annoying :-) If anyone has a clue, I'd love to hear from them!


Posted on 14 November 2004, to Internet | Site News | Web Design
-- Site News --

Site update


Updated the site! First I installed Marc Liyange's PHP Apache Module in order to experiment with PHP. Then I found a slick PHP random image script which led me to (finally) revamp the site's general look. Finally rid of those default Movable Type colours!


Posted on 12 October 2004, to Internet | Site News | Web Design
-- Internet --

Spamadelic


Ok ... I've been discovered by one particularly dorky spammer. He's just posted a spam comment to every single previous post! I am now investigating the options. There is a good summary here, but the best bets seem to be MT-Blacklist and SCode. However according to this page, SCode hasn't been tested with MT 3.x yet. In the meantime I've turned on comment approval, so comments will no longer appear on this site until approved by me. Sorry about that, hopefully it won't last long. Watch this space!


Posted on 8 October 2004, to Internet | Site News | Web Design
Comment on this entry
-- How To... --

Flippin' ecto!


I've heard good things about some blogging software called ecto and decided to try it out today. Installing it was a bit of a pain, it turned out I needed some files that were included in a full Movable Type 3.x install but not included in an MT 2.661 upgrade install. I ended up in the ecto support forums where with some very prompt help from the author managed to get it working.

I've now been playing with the software for a couple of hours and, essentially, I love it. There are a few areas where it it still manages to outfox me, most of them are to do with ecto's WYSIWYG Rich Text editing interface. There is also a plain HTML interface, which is mainly what I've been using. Even though the entries in plain HTML look the same as they do in the Movable Type entry screen, ecto's interface is infinitely better, largely because of the vast speed increase the whole blogging procedure undergoes.

Other highlights have been ecto's clever HTML tag shortcuts For instance you can copy a destination URL into the clipboard, switch to ecto and highlight the phrase to be hyperlinked, press command-shift-U and hey presto you have a hyperlinked phrase. Simpler stuff like command-I and command-B work as well (this sounds like nothing, wait until you've have typed <i> and </i> a few hundred times). Also worth a mention is the highly illuminating graphical breakdown of the program in the ecto support forums.


Posted on 6 October 2004, to How To... | Internet | Mac OS X | Site News
-- Internet --

Upgrading to Movable Type 3.11


Upgraded this site's underlying software from Movable Type 2.661 to Movable Type 3.11 today. Following the upgrade instructions got me into trouble straight away simply because I uploaded the required files as the root user instead of from my user account. This gave all my files the wrong owner and group, which caused mt-upgrade30.cgi to give me this error:

Bad ObjectDriver config: Connection error: Access denied for user: 'thoughton@localhost' (Using password: NO)

After poking around a bit, I figured out that simply using the Finder instead of FTP to copy the required files from the MT-3.11-upgrade-en_us folder to my CGI-Executables folder solved this problem. Opening mt-upgrade30.cgi in a browser now produced some upgrading messages. Opening mt-upgrade31.cgi finished the job. Movable Type 3.1 should now be installed! But first I had to iron out a few problems.

The first thing I noticed upon logging into the new MT 3.11 installation was that the screen was all mixed up, with some new background images and some old (version 2.661) background images. Rebuilding the entire site fixed this, but on my first few rebuilds I got permissions errors involving index.html, index.rdf, index.xml, rsd.xml and archives.html files. Using the Finder to change the permissions of these files so that the group owner was 'www' and had read and write access fixed these rebuild errors.

Voila! Logging into the site worked fine now. One of the first things I did was to go to the preferences section and uncheck 'Use Old-Style Archive Links'. This switches the individual archive entries to have meaningful names (like upgrading_to_mo.html instead of 000090.html). Rebuilding after this produced a new permissions error involving MT's local archive path (on this site the path is tim/weblog/). Using the finder to change the ownership of the folder so that it was in the www group with read and write access fixed that problem.

I soon realised that the new site did not have the category icons anymore, but copying over topicon.pl and topicon.cfg from my old MT install followed by a rebuild fixed that! So far everything else seems to be working. Watch this space!

Update: Due to the extra two levels in the directory structure of the new meaningful-name archive files I also had to update some image paths on the archive templates.


Posted on 4 October 2004, to Internet | Site News | Web Design
-- Site News --

Downtime


I'm off to Portugal tomorrow morning, so there will be no new entries until the 10th August 2004. Thanks for visiting :-)


Posted on 25 July 2004, to Site News
-- How To... --

Category icons in Movable Type


I wanted to add category icons to the website, so after a bit of reading I decided to give the TopIcon Movable Type plug-in a try. Installation was fairly straightforward - the only slightly obscure part was the documentation on the naming conventions for the icon files. I seem to have it cracked though, except for an odd spacing issue where the entry title doesn't extend to two lines.

Update: worked around the space problem by wrapping everything in a table with a defined width for the first cell.


Posted on 11 July 2004, to How To... | Internet | Site News | Web Design
-- How To... --

Movable Type, here I come


Well, I've taken the plunge and installed Movable Type onto my PowerBook. It's a very popular web log package which also happens to be free if you install it yourself (which probably accounts for its popularity). Since I know nothing about MySQL, I did some googling and found a very useful installation tutorial which led me through most of the process. Everything looks pretty good so far, although I still need to customize the look of the new pages.


Posted on 16 May 2004, to How To... | Site News | Web Design
-- Internet --

The return of typhoon8


I have finally, after months of effort and four transatlantic faxes, managed to persuade Network Solutions that I am actually who I say I am. They have now changed my registered email address (they still had the old Hong Kong one) so that I once again have access to the typhoon8.net domain. Thanks to the free URL redirection service at MyDomain.com, I've pointed typhoon8.net to this page for now.

On a related note, while looking into the typhoon8.net situation, I noticed that typhoon8.com has been registered to an outdoor adventure company based in Hong Kong. On their website's links page they have a link for the "other" typhoon8, and the link is to the Hong Kong Observatory's typhoon signals explanation page! In the spirit of one-upmanship I thought I'd post this:

whois typhoon8.net
Domain Name: TYPHOON8.NET
Administrative Contact, Technical Contact:
Houghton, Timothy (31613958I)
Record expires on 18-May-2005.
Record created on 18-May-1999.

whois typhoon8.com
Domain Name: TYPHOON8.COM
Created on..............: Fri, Nov 29, 2002
Expires on..............: Mon, Nov 29, 2004
Record last updated on..: Thu, Feb 06, 2003
Administrative Contact:
Asia Explorer Limited

Maybe I should email them and demand inclusion on their links page! Or maybe I should just flog typhoon8.net to them. :-)


Posted on 2 April 2004, to Internet | Site News
-- Mac OS X --

Finally, a 24/7 connection


The broadband modem arrived today. Setting it up was pretty simple, just plug it in and a few clicks. BT's OS X installer even works (their dialup one didn't, I had to manually open up their coookie to configure that). It only seems to be able to connect at 256kbps though, instead of the advertised 512. I'll give it a few days and see how that goes, since some ADSL modems need to be 'trained'.

Setting up the Apache webserver that's built into OS X was very easy. One click fired up the server, but then I had to spend a few minutes googling to finding out where the root directory was (inside /Library/Webserver/Documents/ if you're wondering). I then set up an account with no-ip.com to forward emandtim.no-ip.com to my broadband connection's IP. no-ip.com make a nice little utility which will monitor your connection and regularly report your IP address to no-ip.com (and thus update the emandtim.no-ip.com redirection). Pretty slick for a free service. I'm now downloading the 600MB Apple Developer Tools - apparently I need them to set up MySQL. With my half-speed broadband it's going to take 4 or 5 hours.


Posted on 12 March 2004, to How To... | Internet | Mac OS X | Site News
-- Internet --

Hello broadband!


Signed up for BT broadband this week. I was originally going to go for Tiscali based on their advertising (30% cheaper, 50MB webspace, free web SMS) but after spending a while reading reviews on the web I've abandoned that idea and gone for BT instead. The only other choice in this area is NTL cable, but Emma and I have had bad experiences with NTL customer support in the past.

Broadband will be great, but it'll mean canceling our BT dialup account. Stupidly BT have decided that although you get 50MB of webspace with dialup accounts, you don't get any with a broadband account. So I'm looking around for free webspace - I didn't pay for it before and I'll be damned if I'll pay for it now! The alternative I've been thinking about is serving this webpage from my own Mac. The broadband will be always on after all! I just have to get the hang of the Apache and MySQL on OS X ... we'll see how that goes.


Posted on 7 March 2004, to Internet | Site News | Technology
-- Mac OS X --

Site update


Updated the website and added fancier galleries courtesy of iPhoto4 and BetterHTMLExport.


Posted on 4 February 2004, to Digital Imagery | Mac OS X | Site News | Web Design
-- Mac OS X --

OS X screensavers


When I first started using Mac OS X back in 2002 I became fascinated with the high quality screensavers that were appearing for the platform. I created a small webpage about them here. The project was mainly to test out an OS X themed webpage design, but a few of the authors contacted me with offers of free software for review purposes, so it worked out quite nicely! Note that the page was written back when I had the typhoon8.net domain (hence the title), and that it hasn't been updated for many months.


Posted on 12 February 2003, to Mac OS X | Site News

Category icon Sponsors