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.

Thinking inside the box – Just what are the bits inside your PC?

If you want to build a PC, then you need to understand the bits needed to put it together. The basics are:

    • A case. This can be a full size tower, or mini-ATX, or even small form factor (SFF). The case size is important, as the interior volume will dictate how many components you can fit inside. Which one you need to choose is going to be dependent on what you want the machine to do and therefore what components you will add to it. Buy an SFF and find that in a year’s time that you buy a game that needs extra RAM to run, but you don’t have any spare sockets then you are going to have a problem!
    • A power supply. This needs to be powerful enough to provide usable power to all of the other components you decide to use. It is always a good idea to provide some headroom in your calculations, as you may want to upgrade or add further components later (unlikely to happen if you go down the mini-ATX or SFF route).
    • A motherboard (MOBO). This is the circuit board which will allow you to plug in everything else to make it work. There are many manufacturers who will generally produce a wide range of boards, each with particular characteristics, and each will be designed for one particular brand of CPU (AMD or Intel). Which one you choose will be a matter of personal preference rather than a particular need, as for the most part, the CPU’s will do largely the same thing. It is only when you need a very specific task carried out that you would need to consider the intricate variances between manufacturer architectural design.
    • A Central Processing Unit (CPU). This is the brains of the operation. The CPU carries out the task of processing all of that code so that you can make the mouse move room one side of the screen to the other. Of course that is an extremely narrow view of what this component does. These days they are multi-core, multi-threading beasts which make sure that everything that you need done, gets done. There are two main manufacturers. AMD and Intel. The CPUs they produce are made using slightly different processes and designs to achieve broadly the same tasks. They are not however interchangeable. You cannot use an Intel CPU on a mobo designed for AMD processors, and likewise AMD will not fit an Intel based mobo. These differences are known as socket variants, and are something you need to understand (at least that the difference exists!) if you want to build your own machine.
    • Random Access Memory (RAM). This is what allows the machine to carry out the processing it needs to do. The CPU will actually crunch the numbers, but to do so it needs to utilise information stored elsewhere (see HDD below). This is where RAM comes in. This is a silicon chip which acts as a file retrieval system for the processor. It gathers and stores the information needed by the CPU, and is used as the processing speeds are so enormously fast that direct reading / writing to and from the HDD by the CPU would be impossible. RAM is volatile memory, so once the machine is powered down, the RAM no longer stores any information. It’s purpose is to facilitate getting information between the HDD and the CPU.
    • Hard Disk Drive (HDD). The HDD is where everything is stored. When you save a photo, or run a program (or app) the HDD is where the information comes from. The CPU takes the information, processes it, and displays it via the GPU (see below). There are different types of HDD. The most recent incarnation is the Solid State Drive (SSD). This utilises chips similar to RAM to store information. The benefits are the small physical size of the drive, and the fact that there are no moving parts to break down. High cost per Gb of storage is the main downside of using SSD. The most popular type of drive in use is the mechanical drive. This consists of a number of magnetic platters which spin inside a housing. While the cost per Gb is lower than SSD, they are noisier and produce more heat (thereby using more power). There also hybrid drives called SSHD. These are a mechanical drive with a small SSD included. The SSD portion is used to store the most accessed programs.
    • Graphics processing unit (GPU). The GPU is used to display the GUI (graphical user interface) which is simply how a program looks on the screen. For most programs, this is a fairly basic static screen, with not a lot of moving pixels. The amount of processing to be carried out by the GPU is therefore quite small. Most decent motherboards will have a small built in GPU, which can handle most basic applications. They will even allow casual gamers to play without any noticeable depreciation in user experience. If however you are editing video files, or playing graphics intensive games then you need more processing power. For these instances, you will want to add a dedicated graphics card. For lower end cards, expect to pay up to GBP50, for mid range up to GBP150 and higher end cards can be anything at all. Some have been on sale recently for GBP4000 or more. If you need one of those cards, chances are you’ll already know all of this though!

    • Other items you may wish to add. There are all manner of additional things you can get. Card readers, DVD / Blu-Ray drives, information panels, sound cards (like a GPU, but processes audio rather than video). Any of these (or indeed other items) would be a matter of personal preference rather than necessity.

If you do decide to go down this route, then you need to plan carefully. You need to ensure that the mobo and CPU you choose are compatible. The RAM needs to be consistent with the clock speeds offered by the mobo. How much RAM will you need? That will of course be dependent on the tasks you expect to do. That should always be your starting point. What is it that I want this PC to do? Once you know the answer to that question, you can then research just what specification you actually need.

PC Hardware modding – why do some people feel the need?

PC gamers have always sought to have the best equipment so that they can play the latest games. This, of course, plays into the hands (and pockets!) of component and PC manufacturers. Once they have the equipment, they can then try to stretch it to the edge of its capabilities in order to provide a better experience. This has led to a complete sub-culture where patrons try to outdo each other on their PC builds, sometimes spending thousands of pounds for an exponentially small improvement in performance, but giving them bragging rights over their peers.

Of course technology tends to move so fast that within a week or two of their build going public, someone will have improved their design and posted slightly higher stats. This never ending battle to be king of the hill keeps some people busy for MONTHS at a time. And it doesn’t look like it will end any time soon!

There are countless websites devoted to hardware for your PC. They will sell you the latest graphics card or processor and tell you that you need it to compete in online gaming. The reality is that the PC you already have will likely run most games (it won’t play them all!) but it may do so very slowly, with very poor graphics rendering. This is where these sites know you will need to spend money to beef up your system. Generally people who go to mainstream shops and buy a PC need something that will browse the web and open emails for them. They may also want to watch Youtube videos and listen to Radio 4 but in general they won’t be doing anything too taxing.

PC gamers on the other hand tend to be a much more involved buyer. They will want a decent multi-core CPU with a low power draw. The GPU needs to be high end, with as many Petaflops as they can get for their money. Water cooling? That’s right, running water inside your expensive PC! The list of updatable components is not quite endless, but the number of iterations is. A low end gaming rig can be put together for a few hundred pounds, or you can splurge several thousands on a beast.

If you want to compete then you need to read up some more on the subject, and you also better have deep pockets!

News, ideas & general random stuff!