FacebookLinked InFlickrRSS

August 10th, 2010 Fixing the WordPress OpenID plug-in

OpenID has been a very popular way of allowing the internet to share it’s users with one another in a way that benefits everyone– without forcing the nuisance of creating yet another account to manage on the users. Some time ago, a gentleman by the name of Will Norris put together a plug-in called ‘wp-openid’ which not only provided your readers the option to log in using OpenID, but also included an OpenID Server- meaning you could use your blog’s URL to log into other places, too! How great is that?

From what I can tell, Will and a group of other talented people formed the “DiSo Project,” which has now been very quiet for quite a while. Will’s WordPress plug-in was absorbed and renamed to just “OpenID.”

All was well in the world until, to everyone’s displeasure, the plug-in’s server functions stopped working! Why was it broken? Well, it hasn’t been updated since November of 2009. What’s happened since then? Ubuntu 10.04 was released, and packaged with the new release of PHP (5.3, which had been released 10 months earlier). The OpenID server side module was full of “pass by reference” variables (&$var). This was depreciated in 5.3, causing a “call-time pass-by-reference” error every time you tried to make use of the server side of the plug-in.

How to Fix It

First, find the file. It should be located here:
<Wordpress Root>/wp-content/plugins/openid/Auth/OpenID/Server.php

Once you have the file open in any editor, do a find and replace as follows:
Find: &$
Replace with: $

Save the file and upload it back to your server (if necessary), replacing the original. You should now once more have a functional OpenID Server. Hooray!

6 Comments Written by Soleil Golden at 1:12 pm
  1. buni
    August 10th, 2010 1:59 pm

    There's more busted than just that, unfortunately. It doesn't work in PHP 5.2.10 either, to which I deliberately downgraded because of the PHP 5.3 problem. There's some other incompatibility between the OpenID plugin and WP3.0.x; every time I try to register a new OpenID, I get some error in Formatting.php.
    Of course, if what you're telling me is "upgrade to PHP5.3 and it works again with this one tweak," I can do that this weekend. =>.>=

  2. Ksilebo
    August 10th, 2010 5:01 pm

    Have you ever switched OpenID backends? I would love to switch to just having WP handle my OpenID instead of worrying about a separate package.

Add Your Thoughts