Thursday, December 24, 2009

How to fix Drupal White Screen of Death/ blank screen

When installing or configuring (or sometimes when just using) the popular CMS (content management system) Drupal you'll be faced with the dreaded WSOD (white screen of death).

This is often because your hosting set up isn't allowing the memory hungry Drupal a big enough bite of the server's memory pie. There are several suggestions throughout the web that this can be fixed by appending the php.ini file in the root of your site, although you may struggle to find php.ini for various reasons.

I build Drupal sites in a cloud/ application server environment and believe I have found a far more effective way of solving the Drupal white screen error.

Fixing the Drupal white screen error using Settings.php
  1. Browse to YOURSITE/sites/default and (after making a backup of it) open up settings.php
  2. Scroll down to the section labelled as PHP settings, if you're using a code editor like DreamWeaver this starts at line 128
  3. Below the line ini_set('url_rewriter.tags', ''); add another line like this - ini_set('memory_limit' , '300M');
Depending the exact details of your hosting this should solve your white screen errors.

Monday, December 21, 2009

To work for a wage, in sickness and in health.

Here I sit with curved spine huddled over my desk waiting for another Christmas to come, and for a sickness to leave. Working on my own at home means I usually avoid the annual winter ‘what’s going round’ but this year a couple of journeys on packed London Underground trains gave me a sufficient dose of the foul feculence of germ spoiled strangers that I myself have become failed and fouled.

When I was an employee (rather than a self employed fool) disease could bring with it delicious compensations – days on the settee watching television utterly smothered by huge warm duvets and surrounded by indulgent drinks and tasty treats. In times of careless wellness spoiled by busyness and stress I would gently sigh and look forward to catching something horrid. I would daydream of snotty tissues, daytime telly and replacing my colleagues for curled up cats. It was like looking forward to a vacation I didn’t have to pay for by forfeit of a chunk of the few days leave my employer graciously granted me each year. To spend five days with a water bottle in a cosy lounge was as delicious as two weeks exploring the world on vacation, and all the more glorious for leaving my annual leave tally undamaged.

So as I sit here at home with nobody to cover my illness absence and no employer to mumble sympathetically but unconvincingly down a phone line at me I lament the loss of my languid lolling days of temporary and mild malady.

This morning in an attempt to remind myself that I could balance the loss of ill employee perks with the augmenting of unscheduled absences from my desk I ventured into my wintery garden. Wearing more layers than Tutankhamen (although in more disarray) I kicked through the snow, chasing the witless abandonment of childhood winters so many decades ago. I made a snowman and was saddened to discover how poor my skills have become having allowed them to lapse; traded now for skills with machines and a love for more literally literal creativity.

I turned my back on my poor play at being a snow bound Prometheus and sought the cats for winter company. After lifting them from their slumber and having them join me in my exile from the warmth of my house I sighed lightly in amusement as they mewed and shivered before seeking the least snowy path back to their warm nests indoors. I too tired of the will of adventure and made my way back to my desk, weary and wanton of recovery.

Copying text from one source to the web using Notepad.

When copying text from any source for use on a website (whether you’re using an HTML editor like DreamWeaver or if you’re using a content management system) it's important that instead of copying from the source directly to the website you go through notepad, so;
  1. Copy from source (word, PDF or whatever)
  2. Paste into Notepad
  3. Copy from Notepad
  4. Paste into website editor.
The reason for this is that a lot of sources (MS Word especially) attach a TON of junk code to all text, and when you paste directly from a source to website the junk code also gets copied across and confuses things horribly (most noticeably the layout). Notepad strips the text back to plain text, therefore removing the junk code. It’s a bit like you’re washing your content!

This is standard practice for all websites, and it's not a bad idea to get into the habit of copying and pasting through Notepad when transferring text from anywhere to anywhere else.