Forum Moderators: phranque
I'm trying to implement OpenID on my site using PHP5, and none of the code libraries work. Unzip the sample libraries, run them demo, and all I get is cryptic (undescriptive and undocumented) error messages. Some of these libraries I've tried are incompatible with the latest release of OpenID itself (version 2).
Most of them are merely variations on the same chunk of code, and require the installation of horrid PEAR libraries.
Nowhere does OpenID really explain how OpenID works
The specifications are ridiculously obtuse
Documentation is among the worst I've ever suffered
How can this possibly catch on if it's so difficult to implement?
They should take a few lessons from reCaptcha, a similarly complex system, but which comes with code that really works, and documentation that a normal human can read and use. The first time I set up a reCaptcha, it took 20 minutes. I've been struggling with OpenID for nearly 5 hours, and right now all I have is a pile of unusable spaghetti code.
Is it just me?
PHPmyadmin is cool if you get it installed right, but it's no cakewalk getting it running. I much prefer other tools for administering mySQL anyways.
Fatal error: current_url must be a string; see NEWS file for upgrading notes. in /public_html/***/openid/Auth/OpenID/Consumer.php on line 417
the NEWS file says that in order for the library to work, I need to change the params being passed to "Auth_OpenID_Consumer::complete()". to wit:
$return_to, a required string that is the return URL passed to Auth_OpenID_AuthRequest::redirectURL()
Maybe this is pointing out the obvious (one of my special skills), but rewriting the arguments of functions embedded deep within strangely named classes is not a walk in the park, certainly outside the comfort zone of most developers, and definitely beyond the annoyance theshold of the rest.
My plan was to get OpenID set up first, then add Facebook Connect, Yahoo auth, and Google signin after that.
I think I'm going to scrap OpenID and move on
I slept on it for a while, then got back to it early this morning. I did need to tweak some stuff in the library, then gradually got everything working. What a pain!
So in summary,
1) OpenID is a very cool pile of technology
2) if it's working, it works quite well
3) is it's not working, it is NOT easy to set up
some tips:
1) get the latest latest latest version of the JanRain library
2) get a 2nd package called "EasyOpenId" (link avail. at [openid.net...]
3) create a folder off your root called "openid" and move the "Auth" folder as a child of that
4) on the server, all you need is the "Auth" and the 3 handler files in EasyOpenId. they go in the "/openid" folder, one level above Auth
5) when you get the "$return_to is not a string" error, the problem is that you're passing in the whole $_GET array, when really it wants $_GET['openid_return_to']. that's on line 78 of EasyOpenId.php
6) $response->extensionResponse() expects 2 params. on line 40 of finishauth.php -> change it to "$sreg = $response->extensionResponse('sreg',true);"
7) when the user logs in successfully, the browser gets sent back to finishauth.php, with a querystring full of goodies. The OpenID is $_GET['openid_identity']. Check if that var exists in the querystring and redirect from there