Category Archives: Miscellaneous

WordPress – The ‘white screen of death’ and how to avoid it.

The ‘white screen of death’ is something that you have come across in either trying to customise your site or you wouldn’t have come here for answers!

On a brand new installation of WordPress it can be extremely annoying to suddenly find that your site doesn’t work. The actual site may be online, but it isn’t much good if the first post simply says ‘Hello world!’ and you can’t change it, or worse still you can’t see anything!

So what causes this?

Problem 1

Well I’ve had the same problem twice with the same installation. The first solution was reasonably simple to fix. The mod_security() settings server side needed changed. This can be done very quickly by your host (assuming they have a dedicated support team and it isn’t a bedroom reseller host) and will resolve the white screen issue in minutes. They simply need to add your domain to their server whitelist.

WordPress doesn’t tell you what the error is by default, but you can force it to provide error messages so at least you know where the error occurs in scripting.

The first thing to do is to create a log file. Do this by creating a file called debug.log in the /wp-content/ folder.

You then need to modify the wp-config.php file to include the following three lines.

define (‘WP_DEBUG’, true);  // Turns on debugging

define(‘WP_DEBUG_DISPLAY’, false); // Set the debugging to NOT display the errors on the live site

define(‘WP_DEBUG_LOG’, true); // Record the errors in a debug log file</code>

 

Make sure that this code is placed before the line which reads             /* That’s all, stop editing! Happy blogging. */ in the wp-config.php file.

This will log all errors and record the actual error in the log file you have created. Although this means you will not see the error message on screen, you will at least be able to track it down and look for further advice when you have found it. The reason for doing it this way is to ensure that error messages are not displayed on the live site. To display the errors in real time (I used this while the site was in dev and therefore not public facing) then simply change the display flag to true.

Problem 2

The second error wasn’t so easy to track down. It manifests itself in exactly the same way when you click ‘customise my site’ from the dashboard, and the white screen is all you get. I eventually narrowed this down to the plugins. Plugins can be very useful. I use several (spam trapping, cookie policy display on first visit, contact form) but the way they interact with the main template can be an issue. The fix for this error is REALLY simple.

If you need to customise the site (either through the dashboard or by changing the code) then start by going to the plugins screen from the dashboard and deactivate ALL plugins. Then make the changes you need, and when you have saved all the changes and are ready to log out, go back to the plugins screen and activate all plugins. This should ensure that the white screen doesn’t affect you, and while it means the plugins won’t work for a short time, this is much more preferable then not being able to make any changes at all. This last point is useful for ANY changes, even adding new posts to the site.

Renault Digital Speedometer – Ever wondered how to change the units of speed?

Change your Renault speedometer from kilometres per hour to miles per hour and vice versa. If you own a Renault with a digital speedometer (odometer) then you will have realised by now that it does not follow the old norm of having a nice dial with both Miles per hour and Kilometres per hour around the edge. You will only have MPH displayed if yours is a UK model so when you cross borders you have to guess what the equivalent KPH speed is. This has obvious implications when you realise how many speed enforcement options are in use these days. It’s in the handbook though, isn’t it?

Well that’s what I thought, but actually it isn’t mentioned anywhere. The handbook covers the display itself, but doesn’t mention how to change between the two options. So I believed that it wasn’t an available option. Just something they forgot to do and we had to put up with it. Quite a lot of searching has changed that for me. And it’s really simple to do!

  1. You must ensure that the engine is completely switched off. Take the key card from the slot, open the door and then close it.
  2. Hold the top button on the wiper stalk (don’t let go until you reach the very end).
  3. Insert the keycard into the slot, and at the same time press the start button briefly.
  4. You will see the mph reading start to flash. Keep holding the top stalk button, allow it to continue and you will see it change to KPH, BUT DON’T LET GO YET!
  5. Once the KPH has stopped flashing, let go of the button on the stalk.
  6. That’s it! You have now changed the display to Kilometres per hour.

Obviously, you just repeat the steps to get back to your original configuration.

Bookie bashing – pastime or business?

One of those questions everyone wants answered. Some people claim to have made it their main source of income, others use it to have some low cost excitement. So just how easy is it to make money from a bookmaker? The old adage is that you’ll never meet a poor bookie. But that’s doesn’t mean that you can’t sometimes take advantage of offers which provide you with (almost) guaranteed money.

Coral recently ran an offer on their website for new customers. It was the Fish-O-Mania 5 event. Open an account, place a bet of up to £5 on a fish being caught at any stage during the two day event and they paid out 5 times the stake (in cash). Of course, with a fishing event it is extremely unlikely that nobody would land a fish. In fact it took about 10 minutes for the bet to come good. So almost free money.

Now that is one of the best sign up offers I have ever seen. Most of the major betting sites will have some form of offer to entice you in and get you to open an account. Generally this will be enhanced odds, but can sometimes be free bets. Usually not as generous as the Coral offer mentioned above though!

If you’re smart, you can use these offers to make small returns on your money. Everyone with even a little sense will tell you that every pile of cash starts with something small. So it’s how you use the offers that determines how much of a winner you will be.

There are many, many bookmakers running online sites these days, and all of them will have a signup offer for you to avail of. If you are smart about it, you can use these signup offers in succession to make a reasonable pot of cash. The trick in making sure you stay ahead is to not place any further bets once you have met the signup conditions. Just withdraw the money and move on to the next site.

Of course, the bookies want you to stay on their site and spend more money (in the hope that you will lose the bet of course!). If you can remain disciplined enough to resist doing so, you should be able to realise a small return on your investment at least weekly.

If you have never placed a bet and if you need to understand the language used by these sites, then you should read this guide on Wikipedia.

Remember that you should never bet more than you can afford to lose and if you feel that gambling has become an issue for you, then you should contact one of the gambling help sites immediately. See below for contact details.

Gamcare or Responsible Gambling Trust Both organisations are registered charities who can offer you help and guidance if you feel that you may have a gambling problem.

Apple are doing it again. Change for the sake of innovation?

Apple Insider have discovered a new patent submitted by Apple, which they appear to be intending to use to make headphone slots thinner, which of course would allow them to reduce the overall thickness of their phones.
Now while it may initially sound like a good idea, it is only on closer inspection of the design drawing that the main issue comes out and slaps you in the face. That flat face on the jack might well reduce the thickness by around 1mm, but it also means that the jack cannot swivel. Doesn’t seem like a deal breaker, but when you realise that the reason these 3.5mm headphone jacks work is because they can swivel to relieve stress on the cable, then you can see what is going to happen.
I have no doubt that we are going to see many stories about broken headphone cables within days of this feature going live on the next iPhone. And if it is indeed implemented then the ‘bendy iPhone’ which was an issue within days of the launch of the last iPhone will seem like a minor blip in comparison. Of course, Apple may have already found a workaround which negates this possibility, but there certainly doesn’t seem to be any mention of it in the patent submission. There is some discussion of ‘flexibility’ in some of the components, but I don’t see anything in these descriptions which would lead me to believe that Apple have resolved this.
You also have to wonder why they have gone with the ‘D’ shape? Why didn’t they just shave another 1mm off the other side as well? If it can’t move or swivel because of the ‘D’ shape, it’s unlikely that having another flat surface would create a bigger problem. In the world of making things smaller because you can, it would be logical to go all the way and get that 3.5mm down to 1.5mm. Perhaps they’ve tested it and found it didn’t work, or perhaps they just didn’t think of it?
Either way, like most new tech I’d wait a few weeks before throwing money at the next iPhone iteration. You might just save yourself a lot of hassle and headaches.