Dec 22
Recently I’ve had a bother with the Mac firewall asking me if I want it to accept incomming network connections every time I open a particular application.
The appropriate setting can be found under:
System Preferences : Personal > Security > Firewall
I have mine configured to “Set access for specific services and applications” which normally asks me if I want to allow an application to accept incoming connections the first time I run it and that’s normally the end of it. The trouble comes when you try and update certain applications using Software Update. I’m not exactly sure what causes the problem but for some reason with specific applications the firewall then proceeds to ask you, each time, if you would like it to accept incoming network connections. This you can imagine is superlatively tedious.
The answer though is to just delete the application from you applications folder and reinstall it. The first time you open the freshly installed application it will ask the question and then bug you no more. Then all you have to worry about is not updating it via software update again.
Dec 15
To Test POP3
telnet xxx.xxx.xxx.xxx 110 (xxx = mailserver)
+OK Hello there.
user USERNAME
+OK Password required.
pass PASSWORD
+OK logged in.
stat
+OK (Information about your mail)
quit
+OK Bye-bye.
Read the rest of this entry »
Jul 17
I’ve been working on some sites locally on my Mac but by default the files are stored in a directory in the individuals user account called Sites and the address you’ve got to type into your browser is http://localhost/~username/etc… this annoyed me because I didn’t want to have to type the tilde character in the address and also that I had to have the files showing in a subdirectories of my user. I couldn’t be doing with it, I wanted to have addresses like ‘http://localhost/subdomain/’ and the solution of course is to use symbolic links.
Read the rest of this entry »
Jan 10

I’ve been meaning to try Joomla for some time and a friend mentioning it last night was the impetus for me to give it a go. I downloaded the latest stable version just now and decided to give it a go.
I was very impressed by the installation script and how it guides you through the installation process with handy guidance, however, I feel it falls down in one area.
Read the rest of this entry »
Dec 30
I’ve been doing some work involving an application that needs to query databases on separate servers however one of the servers will only accept mysql connections locally so the way round it is to forward connections from a port on one system to a port on a remote system. That way the connection to the remote database will appear as though it originated locally and be accepted.
To set up a tunneled connection you issue the following command on any client:
ssh -fNg -L 3307:127.0.0.1:3306 myuser@remotehost.com
The first command tells ssh to log in to remotehost.com as myuser, go into the background (-f) and not execute any remote command (-N), and set up port-forwarding (-L localport:localhost:remoteport ). In this case, we forward port 3307 on localhost to port 3306 on remotehost.com.
Nov 05
I’ve created a Wordpress plugin to create and manage lists of frequently asked questions. Currently its a work in progress but you can download the beta if you want a preview. If you want more information or to download a copy then check out the Easy FAQ page above.
Screenshot:

Aug 05
One of the ways I like love to combat spam is by using email aliases. Basically I have one real email address that I do not give out to people but that I use to check my email with my provider. Then what I do is create any number of virtual or alias email addresses in my provider’s admin interface. So the scenario is that everytime I need to provide an email address for membership or to interact with a company I create a new email address (alias) for them and then give them that address. The beauty is that I only have to check one address and all my mail from all of those alias addresses gets sent to it automatically.
So if I ever get spam then I know exactly where it’s come from because each company / person has their own email address alias. It’s easy to stop them too, just delete the alias and no more spam! Not only that but the company or person who either spammed or allowed you to be spammed has just lost some credibility with you. Read the rest of this entry »
Jul 10
Last night I was working on determining how long a user had been logged into a PHP application but was having a problem with subtracting timestamps and this is how I solved it.
I was storing two timestamps (as a UNIX timestamp) in the database. One designating the date-time the user logged into the application and the other the date-time of the last activity the user performed. Because I was using UNIX timestamps, which are just the number of seconds sine the UNIX epoch, I subtracted one from the other and used that difference as the input to the PHP function date().
I couldn’t for the life of me work out why the date function was saying that I was logged in for an hour longer than I should have been and it was driving me crazy. It turns out that the reason was that my timezone locale setting in PHP is ‘Europe/London’ and that this causes the date function to adjust for British Summer Time (GMT + 1) thus when I used my timestamp difference in the date() function it translated the difference into a readable format but also added an extra hour.
The solution is to use gmdate() which is identical to the date() function except that the time returned is in Grenwich Mean Time format.
Jul 04
If you’ve ever used opera or other browsers like konqueror then I’m sure you like the way you can search from the address bar by typing a custom shortcut and your search query. to search for ‘Premium Bonds Checker’ on google using Opera I’d just hit F8 (to get to the address bar) and then type ‘g Premium Bonds Checker’ and hit return because g is my shortcut for searching google.
This morning after I finally found it I checked my Premium Bonds holder’s number to see if I’d won (better luck next month). I thought to myself wouldn’t it be nice if I could tell Opera to check my holder’s number for me without having to go find it once a month.
The way I did it was to edit one of Opera’s custom search records. Read the rest of this entry »
Recent Comments