Friday Fun – Movies in a Minute

Watching Spiderman 2 on UKTV Gold this week, there was a 60 second animated movie spoof in the adverts that had me laughing. Searching for it, I found several, here are 3 of the better ones

Movie In A Minute – Action Movie

Movie In A Minute – Sci Fi Alien Invasion Movie

Movie In A Minute – Superhero Movie

{ 4 comments }

Solution to WordPress Blank Screen of Death

As I posted last week, getting my blog hacked forced a wordpress upgrade to v2.5.1 however it also caused a problem I had previously been unaware of, the WordPress Blank Screen of Death. This is basically where under some circumstances, you get a blank plain white screen instead of the page you were looking for. In my case, I was completely locked out of the admin screens and could do nothing with the blog apart from post comments!

This post is going to take you on a journey, one that starts with following standard debugging techniques that I’ve learned from years of experience in the IT industry and ends in a discovery so surprising, it’s made me question the fundamental quality of the whole blogging phenomena that is WordPress (WordPress is the blogging software this crossfit blog uses and is arguably one of the most popular). I started off as anyone should when faced with a new and unfamiliar problem, by doing some research:

Get expert advice and hundreds of videos to build your own websiteWhat I found was that this appears to be a common WordPress problem suffered by many bloggers and can arise in many possible situations e.g.:

  1. After writing a comment and clicking Submit.
  2. Accessing any of the main blog screens.
  3. Accessing any of the administrator screens.
  4. After *doing* something in the administrator screens.

During the upgrade, I noticed I was suffering from (4) above. I could access the admin pages no problem, but whenever I tried to do anything adminy I’d get the Blank Screen of Death e.g. change a plugin setting or write a post or change anything. The action I was performing worked ok, but I’d have to hit the back button and do an F5 Refresh to see the results of it. At the time I figured I’d deal with it later.

It was made worse because there were no error messages: No errors on the wordpress white screen of course; nothing in the main wordpress error.log; nothing in the plugin error log; and nothing in the webserver apache error log. And in the absence of any information it’s a tough problem to debug. However, with my advanced Google Foo skillz, I was pretty confident of finding the answer. I did in the end, but it took me hours!

Here are all the causes and working solutions I found on the net that others have specified:

  • A partially complete upgrade – Solution: Re-upload the upgrade files.
  • FTP Client making a mess of the upgrade – Solution: Get a better FTP client and re-upload the upgrade files.
  • Something failed running /wp-admin/upgrade.php upgrade script – Solution: Find out what failed (check logs), fix it and re-upgrade.
  • Incompatible Plugin Enabled – Solution: Disable all plugins, then add them back one at a time to see which one causes the problem.
  • Adding the new define(‘SECRET_KEY’,… parameter into wp-config.php – Solution: Don’t put it at the end of your file, put it before the line that says /* That’s all, stop editing! Happy blogging. */

Working down this list posed a problem: How could I disable the plugins without access to the admin screens?!? In the end I had to manually hack the MySQL database directly via the back end. In short, here’s what I did:

  • Accessed my webserver admin screens, cPanel in this case.
  • Accessed the phpMyAdmin MySQL user interface.
  • Browse the wp_options table.
  • Find the field called: active_plugins.
  • If you just want to look without the risk of cocking it up, here’s the SQL you need:
    • SELECT option_value FROM wp_options WHERE option_name = ‘active_plugins’ LIMIT 1;
  • First things first before you go fiddling: BACK UP THE VALUE OF THIS FIELD by copying to a text file on your PC.
  • Then either use phpMyAdmin to blank the value of the active_plugins field, or use this SQL:
    • UPDATE wp_options SET option_value = ” WHERE option_name = ‘active_plugins’;
  • Just to be clear here, if you don’t know what you’re doing, then don’t do it! I’m not responsible for you messing up your blog even more. You should have regular backups and have proven to yourself that they work and you are competent enough to restore from those backups.

Anyway, that will disable all your plugins… great. Just one problem: it didn’t fix my Blank Screen problem!

I’ll cut a long story short, as it did take me another hour or 2 to finally find the solution. Now what I’m about to say is a complete shocker to me. As an experienced IT person, someone who has been messing around with and programming computers and working on IT projects in every possible role up to IT Director for over a decade, I am completely dumb founded by what I’m about to describe, because how the human race has got to 2008 with all the technologically related advances we have made, and yet still introduce a hugely powerful and popular program like WordPress, that is brought to it’s knees by the most innocuous of things… it’s just completely beyond me.

Anyway here is the answer: it lies in the wp-config.php file, this is the file where you set your database password etc (so you’ll forgive me for not using my own real one. ๐Ÿ˜‰ ). This is the example file that comes with the installation:

— File Starts —
<?php
// ** MySQL settings ** //
define(‘DB_NAME’, ‘putyourdbnamehere’); // The name of the database
define(‘DB_USER’, ‘usernamehere’); // Your MySQL username
define(‘DB_PASSWORD’, ‘yourpasswordhere’); // …and password
define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
define(‘DB_CHARSET’, ‘utf8’);
define(‘DB_COLLATE’, ”);

// Change SECRET_KEY to a unique phrase. You won’t have to remember it later,
// so make it long and complicated. You can visit http://api.wordpress.org/secret-key/1.0/
// to get a secret key generated for you, or just make something up.
define(‘SECRET_KEY’, ‘put your unique phrase here’); // Change this to a unique phrase.

// You can have multiple installations in one database if you give each a unique prefix
$table_prefix = ‘wp_’; // Only numbers, letters, and underscores please!

// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to ‘de’
// to enable German language support.
define (‘WPLANG’, ”);

/* That’s all, stop editing! Happy blogging. */

define(‘ABSPATH’, dirname(__FILE__).’/’);
require_once(ABSPATH.’wp-settings.php’);
?>
— File Ends —

That is a perfectly fine, normal and working wp-config.php. Now I’m going to show you a broken one. One so terribly horrendously broken, that it causes you to be locked out of your workdpress blog for half a week and lose 1/2 a day trying to solve it. See if you can spot the difference:

— File Starts —
<?php
// ** MySQL settings ** //
define(‘DB_NAME’, ‘putyourdbnamehere’); // The name of the database
define(‘DB_USER’, ‘usernamehere’); // Your MySQL username
define(‘DB_PASSWORD’, ‘yourpasswordhere’); // …and password
define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
define(‘DB_CHARSET’, ‘utf8’);
define(‘DB_COLLATE’, ”);

// Change SECRET_KEY to a unique phrase. You won’t have to remember it later,
// so make it long and complicated. You can visit http://api.wordpress.org/secret-key/1.0/
// to get a secret key generated for you, or just make something up.
define(‘SECRET_KEY’, ‘put your unique phrase here’); // Change this to a unique phrase.

// You can have multiple installations in one database if you give each a unique prefix
$table_prefix = ‘wp_’; // Only numbers, letters, and underscores please!

// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to ‘de’
// to enable German language support.
define (‘WPLANG’, ”);

/* That’s all, stop editing! Happy blogging. */

define(‘ABSPATH’, dirname(__FILE__).’/’);
require_once(ABSPATH.’wp-settings.php’);
?>

— File Ends —

What do you think, can you see it the mistake that breaks the whole blog? No? Go back and look closely…

Still no? Ok ok, I’ll give it to you, here’s the problem:

What? You can’t see that either? Let me show it to you again, look carefully this time:

You getting it yet? Yep, it’s an empty line. That’s all it is. 1 single solitary NewLine at the bottom of the file, right after that ?> a Carriage Return & Line Feed in programmers speak. That’s it. You hit the Enter key in one wrong place and the whole pack of cards comes tumbling down! Shocking, just shocking. Let me be crystal clear, it’s this bit here:

?>

— File Ends —

Now of course, the Analyst in me wants to know how this happened and I’ll tell you. The issue was the the new define(‘SECRET_KEY’… entry I mentioned before. That should have been my warning, because when I was following the upgrade instructions, they don’t tell you where to put it, so naturally I first put it at the end of the file…. yep you guessed it: AFTER the ?> . I realise now of course that was stupid and it didn’t work. What was the symptom of it not working? You guessed it: the WordPress Blank Screen of Death. This can also happen in your theme’s functions file. Make sure you do not have any โ€œextraโ€ returns after your last ?>

But when I moved it to the correct place, I was still sporadically getting problems, then I commented the line out and basically with all the changes I made I seemed to have got myself into the situation where I was getting the problem, but only half the time. I reckon the currently open admin session I had going was probably masking half of the issue from me. But in putting it at the end of the wp-config file and then moving it, I must have left behind an empty line. How silly of me! So just make sure you have no extraneous characters after the ?> I’d recommend checking for those evil and nefarious spaces too. ๐Ÿ˜‰

There are 2 things I’ve done which not only dramatically reduce the headaches that WordPress gives me, but gives me access to something that’s absolutely vital for ensuring a good WordPress / Life balance! The first is to get the Thesis Theme. Nothing good in life is free and (at the time of writing) the Thesis theme costs $164 for a multi-site licence, or a more modest $87 for a single site. This site uses the Thesis theme and I have to say, I’m be super impressed with how easy it is to customise to get it exactly how I want it. But even more, there are literally thousands of Thesis websites devoted to helping you, and that’s not to mention the really impressive members only support forms. Hit any problems, and rather than spend time searching the web, you’re sure to find help there. Highly recommended.

Learn to Customize Thesis Like a ProGetting the Thesis theme may seem like an unnecessary outlay when there are many free WordPress themes out there, but I can honestly say it’s be the best investment I’ve made on this site. I’ve yet to have a single problem or crash since using the Thesis theme, it’s so easy to use and the wealth of help out there is astonishing. Rick from the Build Your Own Business website for example has over 700 tutorial videos covering everything you’ll ever need, and private coaching available if you really get stuck. As they say, prevention is better than cure. Highly recommended.

Anyway, that’s the fix and probably the most comprehensive study of getting wordpress blank screens anywhere on the net. If you find this post useful, please consider linking to this post from your blog, it will help others find this article who may have the same problem.

{ 297 comments }

Nancy Kicked my Butt

The gym on Saturday was horrendous. It was the named Crossfit Workout Nancy, which with 5 rounds of 400m running was always going to be a bad one for me.ย  Especially with the over head squats mixed in, it meant there was no rest for the legs.

Depressingly I was unable to make all the runs, the 3rd and 4th run resulted in a few walks.ย  I’m sure I’m physically capable, it’s just a mind over matter thing.ย  When you’re struggling for breath, the legs are killing you and the mind is (none too quietly) whispering in your ear: “You can’t go on… You only have to stop running and the pain will disappear….” but then I guess that’s why they call it Mental Toughness. ๐Ÿ˜‰

You’ll notice I didn’t say I walked on that last run.ย  I would say that was out of choice, but no.ย  Matt / Fozzie, a long time member at Crossfit Manchester and a Taekwondo instructor, having just finished his Nancy, decided to run another block of the Mill just to keep me company.ย  As much as I didn’t want him to, it kept me honest and I made the run, thanks Matt.

It certainly goes some way to demonstrating the close bond between members of Crossfit Manchester, which is in part of course due to the 2 great coaches we have in Mark and Karl, but also to the camaraderie that Crossfit engenders amongst its members.ย  Whilst every workout is scaled to each persons individual abilities, there’s something special about everyone doing the same workout on the same day and in the gym, at the same time.ย  Crossfit builds a team spirit and sense of unity that you don’t get at your normal gym, where everyone is lost in their own iPod world, doing there own thing.

The scaling also meant that I was soundly beaten by Derrick, who has just turned 60 and for much of the (for me) 22 minute workout was neck and neck with Lawraine, who has said she doesn’t mind me saying that she is 59 (I think, Lawraine, correct me if I’m wrong!).ย  It was Lawraine lifting first in the Crossfit Girls Olympic Weightlifting Video I posted last week.

{ 2 comments }

What a Dire Week that was

A diary of a terrible week and an explanation of why there was no Friday Fun post this week (as promised):

  • At the beginning of the week my daughter got sick, full on vomiting, the works. She nearly missed a birthday party because of it, which when you’re 7, would have been a world ending disaster.
  • I’ve finally had to come to a decision I didn’t want to make about work, and it’s not a good one. Won’t bore you with the details but I’m going to have to make a slight change of direction.
  • As per my last post, my WordPress Blog was hacked, necessitating the best part of a day to upgrade it and get everything re-setup (plugins etc).
  • The wife is finding it harder than she thought finding a contract as a jobbing programmer.
  • A world ending event did happen to my daughter: she dropped the top off the (very rare) ice-cream I bought her, on the floor! We had floods of uncontrollable tears for about 20 minutes. Still it’s a consolation to know that she’ll remember that day for the rest of her life. I still have vivid memories of dropping the top of an ice cream with my Grandma when I was 6! One of only a handful at that age.
  • The wife got sick, what the daughter had, lots of throwing up, it was pretty bad.
  • I got sick! Woke up at 3am hurling my guts up. Now I know I’m a fella and there’s Man Flu and all that, but I can honestly say, it was the worst illness I’ve had for as long as I can remember. For 24-36 hours I could barely move, certainly couldn’t eat. Thankfully I’m all right now and 2 pounds lighter! Must get back on the fish oil (I’ve been lax recently.)
  • I discovered that after upgrading my blog, I was locked out! Every time I logged in, I just got the WordPress Blank Screen of Death. Which is exactly what it sounds like, a completely blank screen with nothing on it. Nothing I seemed to do could get me in. Obviously the fact that I’m writing this post (at 5am on a Saturday *sigh*) means that I fixed it, but it took all Friday afternoon to work it out. I’ll do a full post on it later, as it appears to be a common problem.
  • Now that I’m better I’m back to my normal ways: waking up far too early. Why *DO* I wake up at 5am most days when I have no reason to get out of bed?? I can’t even realistically do any Crossfit exercises that early in the morning, what would the neighbours think?

So there you have it, an appalling week by any standards. How was yours?

{ 3 comments }

This Blog Was Hacked

I’ve been having some problems these last few weeks with excessive bandwidth usage and had been unable to work out why the average bandwidth used per visitor had increased five fold!

Basically I’d hit my upper bandwidth limit twice in the last week (you may had noticed) despite not loading the site with much more material than normal. Further, the webserver statistics showed that 93% of the bandwidth was being used consumed just downloading raw html files, not images or videos or anything. I was flummoxed as to what the problem was.

Then this morning I saved the home page to my PC, to see if it really was as big a file as the stats seemed to be suggesting… sure enough it was: a 900kb .html file! Why was it so big? Checking the raw html source code I was shocked to discover literally thousands of hidden links out to other sites, for all sorts of nefarious links, I’m sure your imagination can work it out.

My blog had been hacked and had all these links inserted without anyone noticing. They were hidden with a style that stopped them being displayed by your browser, but they were still there.

It only took a few minutes to delete them all, but it’s taken me all morning to upgrade the wordpress version from 2.1 to 2.5.1 I hate upgrading, it’s a pain in the butt, not least of which because of incompatibilities between the new version and all the plug-ins I have installed. This is why I’d been sitting on such an old version for so long.

The irony of the situation is this though: if the hackers hadn’t been greedy and uploaded such a huge number of links (a pointless exercise from an SEO perspective to be honest) I would never had noticed. If they’d just restrained themselves to 2-3 links, or hell, even 50, I probably would never have suspected a thing. But 800kb of hidden links is hard to miss. Just to be clear, that’s about 2000 lines of extra links.

If you don’t understand why someone would do such a thing, it’s all to do with how the search engines rank pages in their results. Basically links to your sites are like votes, the more votes you get, the more important Google thinks your site is and the higher up it lists your website when people search for stuff. It’s rather more complicated than that, as I’m sure you realise, but that’s the essence of it.

{ 10 comments }

Friday Fun – 8413 ESA Astronaunt Applicants

Being busy making all the Olympic weightlifting videos meant that I am a bit late posting about the developments with week with NASA and ESA. So I thought I’d roll it into a Friday Fun post too. So here’s a nice spot the difference competition, courtesy of NASA.

Whilst looking innocuous, this is one of the most monumental photographs in the history of man kinds space program. It’s the picture of the Phoenix space craft on Mars, digging in the dirt and finding ice just beneath the surface. This discovery is what is going to make a Martian Base possible.

It’s also a great spot the difference picture. Can you see the rocks of ice that have evaporated in the 2nd pic?

In other astronauty news, ESA has revealed that far from the 50,000 suspected applicants only 8,413 people from across the whole of Europe submitted an ESA Astronaut Application. The list includes just 822 people from the UK, 697 men and 167 women.

The quick amongst you will have spotted that 697 + 167 does not = 822! That’s because included in the break down figures are 42 people who indicated this country as their 2nd citizenship.

Either way, that’s a lot of application forms for them to trawl through. The applicants successfully making the next stage get to attend psychological testing, defined as:

Those tests aim to identify the psychological and technical skills of the applicants, who will be tested in different fields including visual memory and psychomotor aptitude.

Sounds like fun! ๐Ÿ™‚

{ 4 comments }

I’ve saved the best video till last. This is Chris, a fellow member of Crossfit Manchester, also in his first Olympic Weight lifting competition. I had the most fun putting this video together. ๐Ÿ™‚ It was great lifting with you Chris.

{ 1 comment }

Crossfit Girls Olympic Weight Lifting Video

I’ve done another video of the weekends Olympic Lifting competition as attended by Crossfit Manchester. This one is a compilation of the 4 women who were lifting.

The first is Lawraine and I’m gagging to say how old she is, but I can’t do that to a lady. Let’s just say, she has a couple of decades on me and we’re all very proud of her. Not least because of her impressive lifting, but also for having the confidence to compete in front of strangers and a judge.

{ 2 comments }

Another Olympic Weightlifting Video

This is another video from the West Wythenshawe Weight Lifting club Olympic Weightlifting competition at the weekend. This time it’s Dominic, a very impressive member of Crossfit Manchester. He lifted just after me.

{ 0 comments }

Olympic Lifting Competition Video

EDIT: Summary of my Lifting Videos:


The first video is ready of the Olympic Weightlifting competition at West Wythenshawe I went to today. It wasn’t really a competition, but was done under competition conditions. I was pleasantly surprised to discover that Bill and Sid from the British Weight Lifting Association were officiating there, which was very nice of them.

My elbow is still not quite 100% and I’m still building up to pre 2008 levels, but it held up well. Certainly I can feel that it’s been used today but it’s not too sore, which is good.

Several things about these lifts. Firstly I am quite pleased that I made all the lifts. I hadn’t even attempted a 55kg snatch this year and also failed to make the 80kg Clean & Jerk only this week.

The snatches looked good. Trying to criticising myself, I think my form was pretty good, though I still haven’t quite got the thigh bounce right.

The Clean and Jerks are clearly a different matter. The cleans were ok, again the thigh bounce needs work. But the Jerks were a bit ropey. The main problem I think is in the dip, I’m dipping too low and I’m pushing my bum back which is launching the bar forward in the air. This in turn forces me to jump forward which means I’m off balance at the top, as can be clearly seen!

It just comes down to practice. Having not done any Olympic lifting for all of 2008 before 3 weeks ago, I am simply a bit rusty. Still the purpose of today was to get experience of lifting in a competition setting, which was well worth it just for that. And of course, it was fun!

{ 7 comments }