收录日期:2020/05/27 12:15:06 时间:2013-04-18 16:03:54 标签:php,openid

Does anyone have openid working in a PHP 5.3 installation? None of the libraries I've tried seem to be working.

Ok, I finally got to fix the library... I explained everything here (you can also download the php-openid library after my changes).

I needed to do what Paul Tarjan suggested but, also, I needed to modify the Auth_OpenID_detectMathLibrary and add the static keyword to a lot of functions. After that It seems to work perfectly although it is not an ideal solution... I think that someone should rewrite the whole library in PHP 5...

The solution is to remove all the of pass-by-reference elements in php-openid.

change

foo(&$param)

to

foo($param)

and the library should work again.

Zend_OpenId is compatible with PHP 5.3, however it only supports OpenID 1.1 and will not work with Google (which uses OpenID 2.0). Janrain's OpenID system normally available via http://openidenabled.com/php-openid/ is the one I'm using for my PHP 5 application (the OpenID enabled site is currently slightly down for maintenance today) - it is also one of the more popular PHP OpenID implementations (only small snag is that it uses temporary files for the OpenID sessions - making getting it working on a multi-server environment slightly tricky).

For me this library worked: http://gitorious.org/lightopenid