February 25, 2009: Thirty Three

Dominica got up early this morning and went to Shop Rite to do some birthday grocery shopping before I got up.  I did not sleep as late as she had thought and I was awake when she returned home so she was unable to surprise me with breakfast in bed.

Dominica picked up cupcakes for my birthday.  We did not want to get a full cake as it would just encourage us to eat too much.  The shop did not have the right cupcakes so Dominica had them make some special ones just for me.

Dominica cooked my favourite breakfast, Egg Beaters on wheat toast with veggie cheese (a soy product, not a dairy one) with maple syrup flavoured veggie sausage.

I did not get very much time to spend with Dominica and Liesl today for my birthday.  Work was quite busy and I was stuck in the basement all day and only barely had any time to come up for lunch.

I never came up with what I wanted for my birthday but today Dominica came up with the idea of getting me a solid state drive based Acer Aspire One running Linpus Linux, a Red Hat variant.  It is a small netbook style laptop which is just one kilogram.  It is very small with an 85% size keyboard – perfect for working in the evenings.  The full-sized HP laptop that I normally use is too large and clumsey to use in the evenings.  Working from the couch in the evenings is difficult to do and having something smaller and lighter would work much better.  It would be especially handy to have a Linux-based machine from which to work as almost everything that I do is on UNIX.

This evening we finally got an opportunity to watch Joss Whedon’s new series Dollhouse starring Eliza Dushku which we have been wanting to watch since it came out.  It is available on Hulu so we are able to watch it.  It is pretty good so far.  We watched the first two episodes.

February 24, 2009: Photo Day

My last day of being only thirty-two.  Boy the years just fly by.  This morning I got started with work right away and worked solid until a little after noon.

After noon, there was some good sunlight coming in the living room windows so I pulled the Ottoman over into the sunlight and set up the diorama that I finished last night so that I could take a series of pictures of the diorama as well as my locos and rolling stock.  The pictures turned out quite well.

I am very happy with how the diorama turned out.  The pictures were the true test.  The pictures turned out well enough, I think, to look just as good as the pictures that they put into the big model train magazines.  I only have one or two angles that I can use with the tiny layout that I have but what is there looks really good.

Dominica and I can’t wait until we have a chance to work on the real, working layout.  It will take us a bit of time to get it to the point where it is ready for pictures but we will get there. Dominica is anxious to get to the store to pic up paints and other modeling supplies that we need to get started.  The real layout has thirteen model buildings that we have already picked up and we will be getting started on those right away so that we don’t have all of them waiting for us after we have the trains running and the scenary completed.

This afternoon I managed to get a lot of pictures uploaded to Flickr.  Check out the Flickr feed for tons of new Liesl pictures including her pictures taken with Landen Laguna on Sunday.

Tonight Dominica and I watched the first of the Miss Marple Mysteries from the BBC.  Dominica has never seen them before.  I have not seen them in years.

We tried to go out shopping tonight but I got stuck working a long day and it was after eight when I was finally able to emerge from the basement and we figured that the shop would either be already closed or closed shortly after we would have arrived.  So we gave up on that idea and just spent the evening at home.

Late in the evening Dominica decided that she needed to make a run to the grocery store.  So I stayed home with Liesl and Oreo while Dominica did her grocery shopping.  I watched the remaining episodes of Knight Rider on Hulu while Dominica was out.  It is a super cheesy show but I enjoy it for some reason.

This week has really gotten away from me and I am working hard to get caught up on my blogging.  Neither Dominica nor I am able to really remember today.  It just went by in the blur.

Move to Toronto

Today is a big day for SGL. Today we moved the web site from hosting in Scranton, PA to hosting in Toronto, Ontario, Canada. The new site now runs on bigger, faster hardware with a separate database server rather than using MySQL on the web server and is hosted out of a bigger, faster datacenter with, we hope, far better uptime. The move was completed around midnight and the old site was shut down for testing.

February 23, 2009: Diorama Finished

Today is my day to finish the model railroad diorama that Dominica and I have been working on all week.  I managed to get almost all of the work on it completed last night but there was a little bit left for today that continued to need me all day.

Genesee and Wyoming Alco RS1 Diorama

The main job for today is adding the rest of the trees to the diorama.  Since we do not have the right glue for this task (the right glue dried out in the kit and went bad) the trees are quite hard to do.  I am using Elmer’s glue instead which works great once it sets but is very liquid and everything has to be supported with toothpicks for hours until it hardens.  We lost a lot of trees throughout the day as they toppled over just from wind or the shaking as we walked around the house.

I am finally managing to get some of the images up on Flickr that have been collecting on the cameras.  Lots of pics so they will be coming for another day or two.

Today was pretty busy.  Every once in a while I would get a chance to pull myself away from work to reset a happy little tree on the diorama.  Overall it was a busy day.  Didn’t really get a chance to even Twitter much today.

WordPress on Red Hat / CentOS Linux

If you run WordPress on Red Hat Enterprise Linux (RHEL) or its free cousin CentOS then you will likely run into the following error after you have unpacked WordPress, installed it and tried to do your initial setup:

Error establishing a database connection

This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at databasename. This could mean your host’s database server is down.

  • Are you sure you have the correct username and password?
  • Are you sure that you have typed the correct hostname?
  • Are you sure that the database server is running?

If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

You are not alone, this happens to everyone.  If you do some searching on this you will find that pretty much no one has an answer for what is wrong.  People running MySQL server locally already know the trick necessary to fix this problem but if you are running MySQL remotely, as I am, then you can be easily mislead into thinking that the fix does not apply to you, but it does.

The issue here, surprisingly, is that SELinux is enabled on the web server and is keeping the MySQL library from communicating with the MySQL server whether local or remote.  Simply set SELinux to Permissive rather than Enforcing and voila, you should be working well.

The command to set SELinux to Permissive mode is:

setenforce 0

You can verify that the mode has changed correctly with:

getenforce

It is important to note that this SELinux issue (bug, I am told) does NOT affect the MySQL client but does affect PHP.  So if you are testing your database connection with “mysql” and it works but WordPress throws the error than you are a prime candidate for this problem.

Also, be sure that PHP has the MySQL module installed:

yum install php-mysql

I have seen this issue on several versions of all of the software components but specifically just dealt with it in CentOS 5.2 with PHP 5.1.6 and WordPress 2.7.1.