Lower-case all URLs with Apache mod_rewrite

February 5th, 2010

Search engines, like Google, will index URLs on your site in a case-sensitive fashion, so www.yoursite.com/iamtest shows up as a different page than www.yoursite.com/iAmTest. This has negative consequences for your search rankings as these different URLs will be interpreted as duplicate content. Read more…

Linux, Technical, apache, server, web , , , , ,

Ubuntu 8.10 Problems on T61 Thinkpad

October 28th, 2009

I don’t often complain about the state of some OSS projects understanding that it is all part of the growth process. However, every once in a while a new version of our favorite product ends up being worse than the outgoing. My personal experience with Ubuntu 8.10 Intrepid Ibex is one such occurence. I upgraded my 8.04 install to 8.10 as soon as it came out. Whereas 8.04 was rock solid and functional (it is a LTS release after all) 8.10 is proving anything but. For the record, the aforementioned copy of Ubuntu is running on a T61 Thinkpad with NVidia graphics and Intel Wireless (pretty standard hardware).

Update: I recently updated the T61 to Ubuntu 9.04 and all of the problems mentioned below have disappeared. So, thumbs-up to canonical and all the OSS contributors involved in this (and any) distribution.

Update: Ubuntu 9.10 runs even better than 9.04 including a boot speedup from 1:35 down to 45 seconds!
Read more…

Linux , , ,

How to install PHP 5.2 on CentOS 5

October 22nd, 2009

I recently needed to install PHP 5.2 on CentOS 5.3. This version of CentOS comes with PHP 5.1 but, in order to run phpMyAdmin, I needed 5.2. The CentOS software repositories are, unfortunately, still stuck with 5.1 and the only way to get a newer version of PHP installed via the package manager (yum) is to add another repository that has a newer version. Read more…

Linux, Technical , , , , , , , ,

MySQL Replication – Silent Timeout Failure

July 19th, 2009

I have been encountering a strange error that causes MySQL replication to stop working without any errors reported via SHOW SLAVE STATUS. The command reports everything running ok and that the slave is caught up with the master (seconds behind master=0).

However, looking into the running processes via SHOW FULL PROCESSLIST I noticed that the thread reading the binary log data from the master has disappeared mysteriously.
Read more…

Databases, MySQL, Technical , ,

WordPress spam killing script

January 30th, 2009

Blog comment spam is an unfortunate reality of having a blog. See the chart to get a sense of how much spam comes in on a daily basis to one of my blogs that receives a moderate amount of traffic. The red line shows the 30-day moving average for the number of spam comments daily.

Number of daily spam comments on the typical blog

Read more…

Linux, Technical , , ,

How green is your code?

January 20th, 2009

Is your code fast and efficient? Is your nasty for-loop killing penguins somewhere and You don’t even know about it? We all hacked and brute-forced through a problem at one time or another – it is inevitable. How much CO2 will your hack release into the atmosphere? Writing power-inefficient code is like driving a fuel-inefficient car – we’ve all done it but it’s just not cool anymore. With green finally becoming the buzz-word everywhere, it is time to take a look at a few numbers surrounding the environmental cost of bad code.

Read more…

Technical, The Future ,

Are Botnets The Seeds of Machine Intelligence?

December 16th, 2008

The Botnet. It is a term that we have grown accustomed to hearing more and more often these days. These networks of zombie machines are responsible for much of the billions of Spam messages that find their way around the Internet every day. The Botnet is a blunt weapon of mass distraction costing billions of dollars in lost time, resources and fraud.

But botnets might be destined for more than just Spam. As it stands, botnets are some of the largest accumulations of computing power in the world today rivaled only by supercomputers and massive server farms such as those of Google. Read more…

The Future , ,

Running Simple and Effective MySQL Backups

December 9th, 2008

We all know that we should backup our data regularly. This is doubly true when it is not our data but our employers data that we are entrusted with. There are two parts to any successful backup strategy: backup and restore. Often, the restore part is left as an exercise to the reader once needed. I will outline a few tip in this blog for how to make a simple and effective backup processes for a MySQL database. Read more…

Databases, MySQL, Technical , , , ,

MySQL 5.1 Released GA

December 1st, 2008

MySQL version 5.1 was released today as GA (Generally Available) which means that you can feel safe in using it in a production environment. Of course, any DBA worth their weight in salt should always test any new version personally before flipping the proverbial switch. If there is no need to upgrade (you don’t need the new features) then there is no reason to take the risk. As MySQL founder Monty points out on his blog, no release is perfect and 5.1 still has some bugs left in this release which, he feels, should have been addressed a while ago. Read more…

Databases, MySQL, Technical , ,

What is MySQL replication?

November 26th, 2008

Replication is a feature of MySQL that allows one database server to mirror the data on another database server by executing the same queries. There are more complicated ways of setting it up but basic replication involves one master server and one slave server. Read more…

Databases, MySQL, Technical , ,