How to fix WordPress Flickr Embed 1.1 plugin error[note color=”#ffffd6″]
After taking the issues to the plugin developer he has released a new update (version 1.2.1) of this plugin. This update fixes
all of the problems described here and so everything mentioned below are now irrelevant.
The new update should work with PHP 5.2.x and it should work even if your WordPress Address (URL) is different from your Site Address (URL).
You might need to reauthorize the plugin with Flickr after the update.[/note]
If you are using WordPress Flickr Embed plugin to display your Flickr images on your blog, you might have recently encountered a nasty surprise after updating the plugin to the latest version of 1.1. Even if you had tried to install the plugin for the first time you might have failed with the following or a similar error.[quote style=”1″]Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or ‘(‘ in /home/coacht/wstitanbaseball.com/wp/wp-content/plugins/wp-flickr-embed/wp-flickr-embed.php on line 12[/quote]
If you are getting a similar error it might mean you are using a PHP version older than 5.3.0. To check if you are using PHP 5.3+, try one of the methods described here.
After seeing the above error message I checked the specified php file and on line 12 saw use \DPZ\Flickr; . This particular statement is using a feature introduced in PHP 5.3.0 called namespaces.
The solution is to change your server settings to use PHP 5.3.x. If you are using a hosting service you can contact support to see if this is possible. I was able to change to PHP 5.3.23 after contacting the helpful support staff at Hostgator and I was able to use the plugin without any further problems.
If your hosting service supports PHP 5.3.x you can try adding the following to your root .htaccess file.
# Use PHP 5.3
AddType application/x-httpd-php53 .php
This will instruct the server to use PHP 5.3.x to parse .php files. However this will only work if your hosting service allows you to change the PHP version through the .htaccess file.
One other problem you might have encountered is that the admin dashboard is completely inaccessible due to the error. If you are having this problem you can manually deactivate the WordPress Flickr Embed plugin by deleting the whole plugin folder. The folder can be found inside wp-content/plugins/ and will be named wp-flickr-embed.
I also encountered another error: AJAX error: error (Not Found) on one of my other sites. This is caused when the WordPress Address (URL) of your blog is different from your blog Site Address (URL). Unfortunately I wasn’t able to find a workaround to this so I had to roll back the plugin update by deleting the plugin and reinstalling the old version.