Recently hit a problem with a client’s site – went to check whether the CMS or any of the plugins needed updating and found that the site wasn’t accessible at all! After the normal idiot checks ( we soon realised that there may be a bit of an issue.

After contacting the client it transpired that the company that hosted his site had upgraded the PHP configuration on his server to PHP 5.4. The company had warned the client with an email saying that the change was going to happen, but to be fair if server-side scripts aren’t your chosen topic you’re probably not going to pay much attention to another ‘update’ email – think how many Java updates ask to run on your computer every month and you get my point.

With help from the client we got access to their hosting cpanel and reset the site to PHP 5.2 and immediately the website returned to the internet! This obviously raised the question: what thing in the site is conflicting with php 5.4? Expecting a long search through the moderate sized site, I was pleasantly surprised to find the issue relatively quickly in the plugins. I had read that the plugin Instapress had a known problem with PHP 5.4, and when I saw that the site was running Flickrpress I decided to check that first – bingo!

Thankfully the wonderful people who post on the WordPress support website had already found and solved the issue and it literally takes seconds – in fact if you had just skipped to this part of the post straight away and not read all the pre-amble you would have already fixed it!

Here’s the fix:

  1. Find the flickr.php file in ../wp-content/plugins/flickrpress/flickr.php
  2. Open it in your favourite code editor (we quite like Sublime Text – but who doesn’t?)
  3. Delete some ampersands
  4. Save changes
  5. Pat yourself on the back for being a PHP wizard.

Ok, so here’s slightly more detail:

  • On lines 67, 121 and 167 change $items = flickrpress_load_items($options, &$cache, 0, &$total); to $items = flickrpress_load_items($options, $cache, 0, $total);
  • And on line 229 change $items = flickrpress_load_items($options, &$cache, $start, &$total); to $items = flickrpress_load_items($options, $cache, $start, $total);

Fairly straight-forward. I can’t take the credit though – that goes to blissofbeing, who posted this fix on the plugin support page.

Thanks blissofbeing you saved me a monumental headache! 🙂

Leave a Reply

Privacy & more..

Cookie Consent Policy