Upgrading Ubuntu Server from 6.10 (Edgy Eft) to 7.04 (Feisty Fawn)

Since I reinstalled my webserver to run Ubuntu Server a couple of weeks ago, I was please to see that Feisty Fawn, the latest version of Ubuntu has been released.

Upgrading my server was easy, I simply followed the instructions on the Ubuntu website for performing the recommended network upgrade for Ubuntu servers.

It also cleaned up my manual installation of my wireless network drivers ensuring that I won't have problems when upgrading the kernel in the future.

The only hiccups I found were around the area of PHP - I use Cacti to monitor my server and network and it was having problems running it's CLI scripts. I had noticed during the upgrade that PHP5 was being installed so I thought it would be best to remove all trace of PHP4 and ensure that PHP5 was installed:

sudo aptitude remove php4-mysql
sudo aptitude remove php4-cli_
sudo aptitude remove php4_
sudo aptitude install php5

Note the "_" on the end of the package name, this also removed all the configuration files associated with that package.

That cleared my cacti issue up and now my server is running happily on the new Ubuntu!

Technorati Tags: , , , ,

How to mount a USB thumbstick drive using Ubuntu Server

I recently upgraded the OS of my linux webserver from Debian Sarge to Ubuntu Server (6.10 - Edgy Eft) (the semi-automatic upgrade from Debian Sarge to Etch messed up my wireless network card and I thought I might as well start again with Ubuntu this time...).

As my server only has a wireless card for it's network access and because the card uses a Broadcom chipset I had no network access after the installation of Ubuntu.

I transferred the required network drivers to a USB thumbstick drive and plugged it into the back of my server. I also use Ubuntu in it's desktop form and that auto-mounts any USB devices that are plugged in. My server didn't so I had to mount it manually.

Normally with Linux you need to know all sorts of information about the drive's file system type that you are mounting - not with Ubuntu, this was all I had to do to get the contents of the USB drive accessible in the /mnt directory:

mount /dev/sda1 /mnt

Technorati Tags: , , , , ,

A big thank you to RobinsReviews.com!

I received a surprise gift through the post on Saturday, a gift wrapped book off my Amazon Wish List from Robin of RobinsReviews.com.

Robin sent me the book after finding the Technorati Tags Bookmarklet on my blog - thanks again Robin I hope you find it very useful!

Technorati Tags: , ,

Problem performing an HTTP Redirect on a Motorola SLVR L7 mobile WAP browser

I'm blogging about this in the hope that it can help anyone else who happens to get stuck with this same issue.

On Friday I was caught out by a very 'interesting' bug in the mobile (WAP) internet browser of a Motorola SLVR L7 handset.

We were attempting to perform an HTTP redirect from one WAP site to another on the SLVR but were receiving a "404 Page Not Found" error message. When we looked at the URL that the phone was attempting to redirect to it was a combination of the first site with a bit of the query string of the second site tacked on the end:

First WAP site: http://www.first.com/Finder?type=holidays
Second WAP site: http://www.second.com/Holidays?title=Great Holiday+Location-Mar+2007

Result of redirect: http://www.firstsite.com/Finder-Mar+2007

We thought it might be the length of the URL, the number of parameters in the query string, or the fact that the sites were situated on different web servers. Mobile phone browsers are notorious for not fully supporting the HTTP stack and the Motorola SLVR was probably no exception. We resorted to slowly stripping out bits of the second URL hoping that at some point it would start to work.

We stripped all the parameters off the end of the second URL and that resulted in a successful redirection to the correct server. We then added the parameters back on and found that when we added the "title" parameter it failed. After a little more experimentation we discovered that the source of the problem was the word "Location" found in the value of the title parameter!

"Location" didn't work but "location" did...

Here's the reason why, take a look at this HTTP redirection header sent from the first server to the handset:

HTTP/1.x 302 Moved Temporarily
Date: XXXX
Server: XXXX
Location: http://www.second.com/Holidays?title=Great Holiday+Location-Mar+2007
...other HTTP headers...

The word "Location" occurs twice, once as a true HTTP header field and once as text in a URL.

Our guess is that the SLVR's browser code is a rather sloppy in how it detects and handles HTTP redirects and rather than looking for "Location" at the beginning of the line it matches the last one that it can find - hence the rather strange "-Mar+2007" on the end of the first URL!

Technorati Tags: , , , , ,