From ms419 at freezone.co.uk Mon Jan 1 19:06:20 2007 From: ms419 at freezone.co.uk (Jack Bates) Date: Mon, 01 Jan 2007 19:06:20 -0800 Subject: php domxml extension Message-ID: <1167707180.5574.20.camel@fis.lat> I'm working on an OpenId module for the Gallery PHP photo album: http://gallery-contrib.svn.sourceforge.net/viewvc/gallery-contrib/trunk/gallery2/modules/openid/ The Yadis library claims to require either the domxml or dom PHP extensions. These are beyond Gallery's current minimum requirements. Can anyone comment why the PHP XML extension is not sufficient for OpenID? Thanks! Jack -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 242 bytes Desc: This is a digitally signed message part Url : http://lists.openidenabled.com/pipermail/dev/attachments/20070101/37e76603/attachment-0001.pgp From cygnus at janrain.com Tue Jan 2 10:43:19 2007 From: cygnus at janrain.com (Jonathan Daugherty) Date: Tue, 2 Jan 2007 10:43:19 -0800 Subject: php domxml extension In-Reply-To: <1167707180.5574.20.camel@fis.lat> References: <1167707180.5574.20.camel@fis.lat> Message-ID: <20070102184319.GI9343@janrain.com> # The Yadis library claims to require either the domxml or dom PHP # extensions. These are beyond Gallery's current minimum # requirements. Can anyone comment why the PHP XML extension is not # sufficient for OpenID? The 'xml' (expat) extension does not appear to support Xpath, which would be why we didn't implement support for it. (If it does support Xpath, please let me know where such documentation can be found, and please feel free to submit a patch to subclass Services_Yadis_XMLParser to implement a wrapper for it.) Neither the PHP documentation nor the expat documentation makes any mention of Xpath usage. -- Jonathan Daugherty JanRain, Inc. From mike at nthwave.net Wed Jan 3 07:48:08 2007 From: mike at nthwave.net (Michael Mell) Date: Wed, 3 Jan 2007 07:48:08 -0800 Subject: JanRain OpenID ruby lib 1.2? Message-ID: Is the http://www.openidenabled.com/openid/libraries/ruby/download/ page supposed to contain a link to the JanRain OpenID 1.2 ruby lib? I see the php download page has the 1.2 lib and the ruby Heraldry Consumer plugin requires it. I can't find it anywhere. Also on http://openid.net/ under Developers in the right bar the link to Libraries should point to the new location. It currently points to a "This page has moved" notice. Thanks, Mike From brian at janrain.com Wed Jan 3 11:08:37 2007 From: brian at janrain.com (Brian Ellin) Date: Wed, 3 Jan 2007 11:08:37 -0800 Subject: JanRain OpenID ruby lib 1.2? In-Reply-To: References: Message-ID: <9674d5350701031108o6f7465feke07fb405322ce277@mail.gmail.com> Hi Michael, You should use the 1.3 version of the library with the Heraldry consumer plugin. It is a bugfix release of the 1.2 version. You may download the source (it also needs the ruby-yadis package): http://www.openidenabled.com/resources/downloads/ruby-openid/ruby-openid-1.1.3.tar.gz http://www.openidenabled.com/resources/downloads/ruby-yadis/ruby-yadis-0.3.3.tar.gz or use rubygems to install: gem install ruby-openid --include-dependencies Hope that helps, Brian Ellin On 1/3/07, Michael Mell wrote: > Is the http://www.openidenabled.com/openid/libraries/ruby/download/ > page supposed to contain a link to the JanRain OpenID 1.2 ruby lib? I > see the php download page has the 1.2 lib and the ruby Heraldry > Consumer plugin requires it. I can't find it anywhere. > > Also on http://openid.net/ under Developers in the right bar the link > to Libraries should point to the new location. It currently points to > a "This page has moved" notice. > > Thanks, > Mike > > > _______________________________________________ > Dev mailing list > Dev at lists.openidenabled.com > http://lists.openidenabled.com/mailman/listinfo/dev > From mike at nthwave.net Wed Jan 3 11:40:08 2007 From: mike at nthwave.net (Michael Mell) Date: Wed, 3 Jan 2007 11:40:08 -0800 Subject: JanRain OpenID ruby lib 1.2? In-Reply-To: <9674d5350701031108o6f7465feke07fb405322ce277@mail.gmail.com> References: <9674d5350701031108o6f7465feke07fb405322ce277@mail.gmail.com> Message-ID: <461fe4100d0385c394c8fd3c0fe115c2@nthwave.net> Hi Brian, That does help. I saw the 1.1.3 version on the download page. I assumed that 1.2 would be a later, not an earlier, revision. I see now that when you refer to 1.3 you mean 1.1.3 and 1.2 refers to 1.1.2. That's confusing for those not in the know especially when there really is a 1.2.1 version of the OpenID lib for php. Thanks, Mike On Jan 3, 2007, at 11:08 AM, Brian Ellin wrote: > Hi Michael, > > You should use the 1.3 version of the library with the Heraldry > consumer plugin. It is a bugfix release of the 1.2 version. You may > download the source (it also needs the ruby-yadis package): > > http://www.openidenabled.com/resources/downloads/ruby-openid/ruby- > openid-1.1.3.tar.gz > http://www.openidenabled.com/resources/downloads/ruby-yadis/ruby- > yadis-0.3.3.tar.gz > > or use rubygems to install: > > gem install ruby-openid --include-dependencies > > Hope that helps, > Brian Ellin > > On 1/3/07, Michael Mell wrote: >> Is the http://www.openidenabled.com/openid/libraries/ruby/download/ >> page supposed to contain a link to the JanRain OpenID 1.2 ruby lib? I >> see the php download page has the 1.2 lib and the ruby Heraldry >> Consumer plugin requires it. I can't find it anywhere. >> >> Also on http://openid.net/ under Developers in the right bar the link >> to Libraries should point to the new location. It currently points to >> a "This page has moved" notice. >> >> Thanks, >> Mike >> >> >> _______________________________________________ >> Dev mailing list >> Dev at lists.openidenabled.com >> http://lists.openidenabled.com/mailman/listinfo/dev >> > From cygnus at janrain.com Wed Jan 3 11:41:07 2007 From: cygnus at janrain.com (Jonathan Daugherty) Date: Wed, 3 Jan 2007 11:41:07 -0800 Subject: JanRain OpenID ruby lib 1.2? In-Reply-To: <461fe4100d0385c394c8fd3c0fe115c2@nthwave.net> References: <9674d5350701031108o6f7465feke07fb405322ce277@mail.gmail.com> <461fe4100d0385c394c8fd3c0fe115c2@nthwave.net> Message-ID: <20070103194106.GJ9343@janrain.com> # That's confusing for those not in the know especially when there # really is a 1.2.1 version of the OpenID lib for php. I guess this isn't the first time someone thought that. The versions of our various libraries are not related, for the record. It's impossible for us to *keep* them the same (at least in terms of minor releases), as some libraries require bugfix releases that others do not. -- Jonathan Daugherty JanRain, Inc. From norman at rasmussen.co.za Thu Jan 4 01:29:03 2007 From: norman at rasmussen.co.za (Norman Rasmussen) Date: Thu, 4 Jan 2007 11:29:03 +0200 Subject: JanRain OpenID ruby lib 1.2? In-Reply-To: <20070103194106.GJ9343@janrain.com> References: <9674d5350701031108o6f7465feke07fb405322ce277@mail.gmail.com> <461fe4100d0385c394c8fd3c0fe115c2@nthwave.net> <20070103194106.GJ9343@janrain.com> Message-ID: <5b698f5a0701040129n6bfb5252xf160c5f0be1a6d22@mail.gmail.com> iirc tortoisesvn numbers it's version : upstreamver_productver. eg: 1.2.1-1.3 could be used for the new ruby lib On 1/3/07, Jonathan Daugherty wrote: > # That's confusing for those not in the know especially when there > # really is a 1.2.1 version of the OpenID lib for php. > > I guess this isn't the first time someone thought that. The versions > of our various libraries are not related, for the record. It's > impossible for us to *keep* them the same (at least in terms of minor > releases), as some libraries require bugfix releases that others do > not. > > -- > Jonathan Daugherty > JanRain, Inc. > > _______________________________________________ > Dev mailing list > Dev at lists.openidenabled.com > http://lists.openidenabled.com/mailman/listinfo/dev > -- - Norman Rasmussen - Email: norman at rasmussen.co.za - Home page: http://norman.rasmussen.co.za/ From mike at nthwave.net Thu Jan 4 07:14:07 2007 From: mike at nthwave.net (Michael Mell) Date: Thu, 4 Jan 2007 07:14:07 -0800 Subject: JanRain OpenID ruby lib 1.2? In-Reply-To: <20070103194106.GJ9343@janrain.com> References: <9674d5350701031108o6f7465feke07fb405322ce277@mail.gmail.com> <461fe4100d0385c394c8fd3c0fe115c2@nthwave.net> <20070103194106.GJ9343@janrain.com> Message-ID: <2e31a5dde3b4f30f9f094cd0de27c99d@nthwave.net> On Jan 3, 2007, at 11:41 AM, Jonathan Daugherty wrote: > # That's confusing for those not in the know especially when there > # really is a 1.2.1 version of the OpenID lib for php. > > I guess this isn't the first time someone thought that. The versions > of our various libraries are not related, for the record. It's > impossible for us to *keep* them the same (at least in terms of minor > releases), as some libraries require bugfix releases that others do > not. Thanks Jonathan. That's understandable. My main point is that documentation and conversation from JanRain has been dropping the "1" in 1.1.3. For example, the README from the Heraldry OpenID Consumer Plugin [1] says PRE-REQUISITES -------------- * JanRain's Yadis and OpenID 1.2 libraries in Ruby. and yet there is *no* JanRain OpenID 1.2 library in Ruby. Mike [1] http://svn.apache.org/repos/asf/incubator/heraldry/libraries/ruby/ openid_consumer_plugin/trunk/openid_consumer/README From cygnus at janrain.com Thu Jan 4 10:38:58 2007 From: cygnus at janrain.com (Jonathan Daugherty) Date: Thu, 4 Jan 2007 10:38:58 -0800 Subject: JanRain OpenID ruby lib 1.2? In-Reply-To: <2e31a5dde3b4f30f9f094cd0de27c99d@nthwave.net> References: <9674d5350701031108o6f7465feke07fb405322ce277@mail.gmail.com> <461fe4100d0385c394c8fd3c0fe115c2@nthwave.net> <20070103194106.GJ9343@janrain.com> <2e31a5dde3b4f30f9f094cd0de27c99d@nthwave.net> Message-ID: <20070104183858.GP9343@janrain.com> # PRE-REQUISITES # -------------- # * JanRain's Yadis and OpenID 1.2 libraries in Ruby. # # # and yet there is *no* JanRain OpenID 1.2 library in Ruby. That's a documentation bug; that is referring to the OpenID *protocol* version 1.2, not the library version. It can be confusing. (But generally speaking, any version number following the word "OpenID" refers to the version of OpenID supported by the implementation in question.) -- Jonathan Daugherty JanRain, Inc. From norman at rasmussen.co.za Thu Jan 4 12:37:25 2007 From: norman at rasmussen.co.za (Norman Rasmussen) Date: Thu, 4 Jan 2007 22:37:25 +0200 Subject: JanRain OpenID ruby lib 1.2? In-Reply-To: <20070104183858.GP9343@janrain.com> References: <9674d5350701031108o6f7465feke07fb405322ce277@mail.gmail.com> <461fe4100d0385c394c8fd3c0fe115c2@nthwave.net> <20070103194106.GJ9343@janrain.com> <2e31a5dde3b4f30f9f094cd0de27c99d@nthwave.net> <20070104183858.GP9343@janrain.com> Message-ID: <5b698f5a0701041237j373880f9v8dc0c8fcd2b264e5@mail.gmail.com> /me grins to himself, extending the naming scheme: 1.2-1.1.2-1.3 (openid-library-frontend) On 1/4/07, Jonathan Daugherty wrote: > # PRE-REQUISITES > # -------------- > # * JanRain's Yadis and OpenID 1.2 libraries in Ruby. > # > # > # and yet there is *no* JanRain OpenID 1.2 library in Ruby. > > That's a documentation bug; that is referring to the OpenID *protocol* > version 1.2, not the library version. It can be confusing. (But > generally speaking, any version number following the word "OpenID" > refers to the version of OpenID supported by the implementation in > question.) > > -- > Jonathan Daugherty > JanRain, Inc. > > _______________________________________________ > Dev mailing list > Dev at lists.openidenabled.com > http://lists.openidenabled.com/mailman/listinfo/dev > -- - Norman Rasmussen - Email: norman at rasmussen.co.za - Home page: http://norman.rasmussen.co.za/ From j at justinburger.com Sat Jan 6 14:32:32 2007 From: j at justinburger.com (Justin Burger) Date: Sat, 6 Jan 2007 14:32:32 -0800 Subject: PHP Adding Multi Optional Fields. Message-ID: <777D1187-0123-41C3-A651-7504C4EC257C@justinburger.com> Hi, I am attempting to get the PHP example consumer working with more than one optional field; I was assuming (according to the example) that I use the "addExtensionArg" function for each field, but when I attempt that, it only seems to pick up the last field passed thru that function.. for example: $auth_request->addExtensionArg('sreg', 'optional', 'email'); $auth_request->addExtensionArg('sreg', 'optional', 'country'); only prompts for country... Am I defining this incorrectly? That is the only thing I changed in the example code. Thanks in advance, Justin. From cygnus at janrain.com Sat Jan 6 18:31:11 2007 From: cygnus at janrain.com (Jonathan Daugherty) Date: Sat, 6 Jan 2007 18:31:11 -0800 Subject: PHP Adding Multi Optional Fields. In-Reply-To: <777D1187-0123-41C3-A651-7504C4EC257C@justinburger.com> References: <777D1187-0123-41C3-A651-7504C4EC257C@justinburger.com> Message-ID: <20070107023110.GC24213@janrain.com> # $auth_request->addExtensionArg('sreg', 'optional', 'email'); # $auth_request->addExtensionArg('sreg', 'optional', 'country'); The reason this doesn't work is because 'optional' is one arg whose value should be a comma-separated list of field names, as per the Sreg spec. The correct code is: $auth_request->addExtensionArg('sreg', 'optional', 'email,country'); -- Jonathan Daugherty JanRain, Inc. From dd at davedash.com Tue Jan 9 20:03:31 2007 From: dd at davedash.com (Dave Dash) Date: Tue, 9 Jan 2007 22:03:31 -0600 Subject: No XML parser found w/ PHP 5.2.0 Message-ID: <694fa1450701092003h5dfa74cag551b22a7e3631927@mail.gmail.com> I keep getting this error: Fatal error: No XML parser was found in /usr/local/php5/lib/php/Services/Yadis/XML.php on line 352 I'm confused as to what I need to install in order for it to work. AFAIK PHP5 comes with DOM ... actually I'm pretty sure of it since phpinfo() says so. Any clues as to what I can do to make this work? Thanks -d -- Dave Dash 612.670.0621 Discover your favorite restaurant: reviewsby.us gtalk: dave.dash -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.openidenabled.com/pipermail/dev/attachments/20070109/0ec2cd04/attachment-0001.html From cygnus at janrain.com Wed Jan 10 09:29:09 2007 From: cygnus at janrain.com (Jonathan Daugherty) Date: Wed, 10 Jan 2007 09:29:09 -0800 Subject: No XML parser found w/ PHP 5.2.0 In-Reply-To: <694fa1450701092003h5dfa74cag551b22a7e3631927@mail.gmail.com> References: <694fa1450701092003h5dfa74cag551b22a7e3631927@mail.gmail.com> Message-ID: <20070110172909.GG5268@janrain.com> # Fatal error: No XML parser was found in # /usr/local/php5/lib/php/Services/Yadis/XML.php on line 352 # # I'm confused as to what I need to install in order for it to work. # AFAIK PHP5 comes with DOM ... actually I'm pretty sure of it since # phpinfo() says so. Which version of the OpenID library are you using? -- Jonathan Daugherty JanRain, Inc. From dd at davedash.com Wed Jan 10 09:34:34 2007 From: dd at davedash.com (Dave Dash) Date: Wed, 10 Jan 2007 11:34:34 -0600 Subject: No XML parser found w/ PHP 5.2.0 In-Reply-To: <20070110172909.GG5268@janrain.com> References: <694fa1450701092003h5dfa74cag551b22a7e3631927@mail.gmail.com> <20070110172909.GG5268@janrain.com> Message-ID: <694fa1450701100934y6568a858la2afd25efd65b28f@mail.gmail.com> 1.2.1 On 1/10/07, Jonathan Daugherty wrote: > > # Fatal error: No XML parser was found in > # /usr/local/php5/lib/php/Services/Yadis/XML.php on line 352 > # > # I'm confused as to what I need to install in order for it to work. > # AFAIK PHP5 comes with DOM ... actually I'm pretty sure of it since > # phpinfo() says so. > > Which version of the OpenID library are you using? > > -- > Jonathan Daugherty > JanRain, Inc. > > _______________________________________________ > Dev mailing list > Dev at lists.openidenabled.com > http://lists.openidenabled.com/mailman/listinfo/dev > -- Dave Dash 612.670.0621 Discover your favorite restaurant: reviewsby.us gtalk: dave.dash -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.openidenabled.com/pipermail/dev/attachments/20070110/2322a862/attachment.htm From cygnus at janrain.com Wed Jan 10 09:48:54 2007 From: cygnus at janrain.com (Jonathan Daugherty) Date: Wed, 10 Jan 2007 09:48:54 -0800 Subject: No XML parser found w/ PHP 5.2.0 In-Reply-To: <694fa1450701100934y6568a858la2afd25efd65b28f@mail.gmail.com> References: <694fa1450701092003h5dfa74cag551b22a7e3631927@mail.gmail.com> <20070110172909.GG5268@janrain.com> <694fa1450701100934y6568a858la2afd25efd65b28f@mail.gmail.com> Message-ID: <20070110174853.GI5268@janrain.com> So you have something like this in phpinfo() (or "php -i")? dom DOM/XML => enabled DOM/XML API Version => 20031129 -- Jonathan Daugherty JanRain, Inc. From dd at davedash.com Wed Jan 10 10:07:14 2007 From: dd at davedash.com (Dave Dash) Date: Wed, 10 Jan 2007 12:07:14 -0600 Subject: No XML parser found w/ PHP 5.2.0 In-Reply-To: <20070110174853.GI5268@janrain.com> References: <694fa1450701092003h5dfa74cag551b22a7e3631927@mail.gmail.com> <20070110172909.GG5268@janrain.com> <694fa1450701100934y6568a858la2afd25efd65b28f@mail.gmail.com> <20070110174853.GI5268@janrain.com> Message-ID: <694fa1450701101007y12cc6d41r2e656b4ffb2f1cbd@mail.gmail.com> I have the following:dom DOM/XML enabled DOM/XML API Version 20031129 libxml Version 2.6.16 HTML Support enabled XPath Support enabled XPointer Support enabled Schema Support enabled RelaxNG Support enabled On 1/10/07, Jonathan Daugherty wrote: > > So you have something like this in phpinfo() (or "php -i")? > > dom > > DOM/XML => enabled > DOM/XML API Version => 20031129 > > -- > Jonathan Daugherty > JanRain, Inc. > > _______________________________________________ > Dev mailing list > Dev at lists.openidenabled.com > http://lists.openidenabled.com/mailman/listinfo/dev > -- Dave Dash 612.670.0621 Discover your favorite restaurant: reviewsby.us gtalk: dave.dash -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.openidenabled.com/pipermail/dev/attachments/20070110/13b70ef1/attachment.html From hellfrozeover at gmail.com Mon Jan 15 16:48:44 2007 From: hellfrozeover at gmail.com (Tom H) Date: Tue, 16 Jan 2007 00:48:44 +0000 Subject: win32 non pear path bug Message-ID: <970066760701151648n44cf95ddqe5b44bfde73a9815@mail.gmail.com> The following error occurs under win32 when examples/consumer/try_auth.php is run using Auth_OpenID directly (copying Auth folder into the consumer folder, as suggested in the readme): Warning: main(Auth/OpenID.php): failed to open stream: No such file or directory in \path\toAuth\OpenID\Consumer.php on line 167 This is because the code at the top of examples/consumer/common.php, which sets the include path hard codes ":" as the path seperator, but win32 uses ";" as the path seperator. The PHP constant PATH_SEPARATOR can be used instead: --- common_old.php 2007-01-16 00:34:26.213269400 +0000 +++ common.php 2007-01-16 00:34:32.947644400 +0000 @@ -2,7 +2,7 @@ $path_extra = dirname(dirname(dirname(__FILE__))); $path = ini_get('include_path'); -$path = $path_extra . ":" . $path; +$path = $path_extra . PATH_SEPARATOR . $path; ini_set('include_path', $path); /** thanks, Tommeh From cygnus at janrain.com Mon Jan 15 16:52:05 2007 From: cygnus at janrain.com (Jonathan Daugherty) Date: Mon, 15 Jan 2007 16:52:05 -0800 Subject: win32 non pear path bug In-Reply-To: <970066760701151648n44cf95ddqe5b44bfde73a9815@mail.gmail.com> References: <970066760701151648n44cf95ddqe5b44bfde73a9815@mail.gmail.com> Message-ID: <20070116005204.GZ5268@janrain.com> # This is because the code at the top of examples/consumer/common.php, # which sets the include path hard codes ":" as the path seperator, # but win32 uses ";" as the path seperator. # # The PHP constant PATH_SEPARATOR can be used instead: Thanks! Applied. -- Jonathan Daugherty JanRain, Inc. irc.freenode.net: cygnus in #openid cygnus.myopenid.com From swizard at gmail.com Tue Jan 16 20:01:50 2007 From: swizard at gmail.com (sangho shin) Date: Wed, 17 Jan 2007 13:01:50 +0900 Subject: immediate deny bug in ruby-openid Message-ID: <451b240f0701162001mb4b527ay1c5d9ba5a37fc627@mail.gmail.com> hi. I think current implementation of ruby-openid lib has a bug in immediate deny answer if request is immediate , service provider should call resp = req.answer(false, server_url) in this case, current server.rb implementation set user_setup_url 'checkid_immediate'. I think it should be set 'checkid_setup' instead of 'checkid_immediate so that user or consumer can redirect to user_setup_url i just copied source code of server.rb and Server.php. it seems to act differently from server.rb def answer(allow, server_url=nil) if allow or @immediate mode = 'id_res' else mode = 'cancel' end response = OpenIDResponse.new(self) if allow response.add_fields(nil, { 'mode' => mode, 'identity' => @identity, 'return_to' => @return_to }) else response.add_field(nil, 'mode', mode, false) response.signed.clear if @immediate unless server_url raise ArgumentError, "setup_url is required for allow=false in immediate mode" end # make a request just like this one, but immediate mode setup_request = self.class.new('checkid_immediate', @identity, @return_to, @trust_root) setup_url = setup_request.encode_to_url(server_url) response.add_field(nil, 'user_setup_url', setup_url, false) end end return response end same part of php lib implementation function answer($allow, $server_url = null) { if ($allow || $this->immediate) { $mode = 'id_res'; } else { $mode = 'cancel'; } $response = new Auth_OpenID_CheckIDResponse($this, $mode); if ($allow) { $response->fields['identity'] = $this->identity; $response->fields['return_to'] = $this->return_to; if (!$this->trustRootValid()) { return new Auth_OpenID_UntrustedReturnURL($this->return_to, $this->trust_root); } } else { $response->signed = array(); if ($this->immediate) { if (!$server_url) { return new Auth_OpenID_ServerError(null, 'setup_url is required for $allow=false \ in immediate mode.'); } $setup_request =& new Auth_OpenID_CheckIDRequest( $this->identity, $this->return_to, $this->trust_root, false, -----------> this part will set checkid_setup $this->assoc_handle); $setup_url = $setup_request->encodeToURL($server_url); $response->fields['user_setup_url'] = $setup_url; } } return $response; } From dev-list-openidenabled at thequod.de Wed Jan 17 13:21:27 2007 From: dev-list-openidenabled at thequod.de (dAniel hAhler) Date: Wed, 17 Jan 2007 22:21:27 +0100 Subject: PHP OpenID lib: use of globals In-Reply-To: <20070116004339.GY5268@janrain.com> References: <200701160130.29545.b2evo@thequod.de> <20070116004339.GY5268@janrain.com> Message-ID: <200701172221.33660.dev-list-openidenabled@thequod.de> On Tuesday 16 January 2007 01:43, Jonathan wrote: > # I require the classes out of a class method (for performance reasons > # only if necessary) and therefor a "global $foo" statement in your > # class methods does not work. I would have to use "global $foo" in > # the method where I'm requiring your classes, too. > > This is a known problem with the current release, and the fix is > merely to include our library files at the file scope, rather than > doing it inside a method. I know, but I want to require the files only if the Plugin gets used. I could have worked around this, of course, but I think a lib like this should not depend on such "restrictions". I've attached a patch against 1.2.1. I've found another todo, but I'll write to the dev list for this. Unfortunately I've discovered the test framework too late. Now I have some lines > 80 chars and it does not seem to work with PHPUnit 3.x. I get: $ ./PHP-openid-1.2.1-modified/admin/runtests Running test tabs Running test longlines Found lines > 80 characters in: Auth/OpenID/URINorm.php (line 112 exceeds length 80) Auth/OpenID/Server.php (lines 176, 485, 742, 763, 1184, and others exceed length 80) Auth/OpenID/DiffieHellman.php (line 35 exceeds length 80) Auth/OpenID/BigMath.php (line 423 exceeds length 80) Running test nobadbraces Running test nobadcase Running test opentag Running test docblocks Running test php Warning: require_once(PHPUnit.php): failed to open stream: No such file or directory in /home/daniel/dev/b2evo.HEAD/blogs/plugins/openid_plugin/PHP-openid-1.2.1-modified/Tests/TestDriver.php on line 16 Call Stack: 0.0023 124776 1. {main} () /home/daniel/dev/b2evo.HEAD/blogs/plugins/openid_plugin/PHP-openid-1.2.1-modified/admin/texttest.php:0 0.0044 172136 2. require_once('/home/daniel/dev/b2evo.HEAD/blogs/plugins/openid_plugin/PHP-openid-1.2.1-modified/Tests/TestDriver.php') /home/daniel/dev/b2evo.HEAD/blogs/plugins/openid_plugin/PHP-openid-1.2.1-modified/admin/texttest.php:3 Fatal error: require_once(): Failed opening required 'PHPUnit.php' (include_path='.:/usr/local/lib/php:/usr/share/php') in /home/daniel/dev/b2evo.HEAD/blogs/plugins/openid_plugin/PHP-openid-1.2.1-modified/Tests/TestDriver.php on line 16 Call Stack: 0.0023 124776 1. {main} () /home/daniel/dev/b2evo.HEAD/blogs/plugins/openid_plugin/PHP-openid-1.2.1-modified/admin/texttest.php:0 0.0044 172136 2. require_once('/home/daniel/dev/b2evo.HEAD/blogs/plugins/openid_plugin/PHP-openid-1.2.1-modified/Tests/TestDriver.php') /home/daniel/dev/b2evo.HEAD/blogs/plugins/openid_plugin/PHP-openid-1.2.1-modified/admin/texttest.php:3 Running test import Failures in: longlines php I hope the patch gets applied (and cleaned up) though. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: PHP-openid-remove-global-statements-in-lib-files.patch Type: text/x-diff Size: 27724 bytes Desc: not available Url : http://lists.openidenabled.com/pipermail/dev/attachments/20070117/b9af951e/attachment-0001.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.openidenabled.com/pipermail/dev/attachments/20070117/b9af951e/attachment-0001.pgp From brian at janrain.com Wed Jan 17 13:29:31 2007 From: brian at janrain.com (Brian Ellin) Date: Wed, 17 Jan 2007 13:29:31 -0800 Subject: immediate deny bug in ruby-openid In-Reply-To: <451b240f0701162001mb4b527ay1c5d9ba5a37fc627@mail.gmail.com> References: <451b240f0701162001mb4b527ay1c5d9ba5a37fc627@mail.gmail.com> Message-ID: <9674d5350701171329n7a971f92p22ff47cd767b123@mail.gmail.com> Sangho, You are correct. I'll get this fixed for the next release. Also, are you writing a server using the ruby lib, or did you discover this behaviour testing against an existing server? Thanks, Brian Ellin brian at janrain.com On 1/16/07, sangho shin wrote: > hi. > I think current implementation of ruby-openid lib has a bug in > immediate deny answer > > if request is immediate , service provider should call resp = > req.answer(false, server_url) > in this case, current server.rb implementation set user_setup_url > 'checkid_immediate'. > > I think it should be set 'checkid_setup' instead of 'checkid_immediate > so that user or consumer can redirect to user_setup_url > > > i just copied source code of server.rb and Server.php. it seems to act > differently > > > from server.rb > > def answer(allow, server_url=nil) > if allow or @immediate > mode = 'id_res' > else > mode = 'cancel' > end > > response = OpenIDResponse.new(self) > > if allow > response.add_fields(nil, { > 'mode' => mode, > 'identity' => @identity, > 'return_to' => @return_to > }) > else > response.add_field(nil, 'mode', mode, false) > response.signed.clear > if @immediate > unless server_url > raise ArgumentError, "setup_url is required for > allow=false in immediate mode" > end > # make a request just like this one, but immediate mode > setup_request = self.class.new('checkid_immediate', > @identity, > @return_to, > @trust_root) > setup_url = setup_request.encode_to_url(server_url) > response.add_field(nil, 'user_setup_url', setup_url, false) > end > > end > > return response > end > > > same part of php lib implementation > > function answer($allow, $server_url = null) > { > if ($allow || $this->immediate) { > $mode = 'id_res'; > } else { > $mode = 'cancel'; > } > > $response = new Auth_OpenID_CheckIDResponse($this, $mode); > > if ($allow) { > $response->fields['identity'] = $this->identity; > $response->fields['return_to'] = $this->return_to; > if (!$this->trustRootValid()) { > return new Auth_OpenID_UntrustedReturnURL($this->return_to, > $this->trust_root); > } > } else { > $response->signed = array(); > if ($this->immediate) { > if (!$server_url) { > return new Auth_OpenID_ServerError(null, > 'setup_url is required for $allow=false \ > in immediate mode.'); > } > > $setup_request =& new Auth_OpenID_CheckIDRequest( > $this->identity, > $this->return_to, > $this->trust_root, > false, -----------> > this part will set checkid_setup > $this->assoc_handle); > > $setup_url = $setup_request->encodeToURL($server_url); > > $response->fields['user_setup_url'] = $setup_url; > } > } > > return $response; > } > > _______________________________________________ > Dev mailing list > Dev at lists.openidenabled.com > http://lists.openidenabled.com/mailman/listinfo/dev > From dev-list-openidenabled at thequod.de Wed Jan 17 14:02:44 2007 From: dev-list-openidenabled at thequod.de (dAniel hAhler) Date: Wed, 17 Jan 2007 23:02:44 +0100 Subject: [PHP-openid] PCRE backtrack error in Auth_OpenID_Parse::parseLinkAttrs() / todo (patch) Message-ID: <200701172302.45199.dev-list-openidenabled@thequod.de> Hi, I find that the Auth_OpenID_Parse::parseLinkAttrs() method is quite ineffective. It failed here (silently), because of a PREG_BACKTRACK_LIMIT_ERROR in preg_match() (introduced with PHP 5.2). The attached patch adds a TODO with an idea of a better/more efficient implementation and a dirty workaround, by disabling this limit. It seems like the parsing fails if the HTML to get parsed is > 100KB or something similar. The default backtrack limit is 100000. -------------- next part -------------- A non-text attachment was scrubbed... Name: PHP-openid-pcre-backtrack-dirty-workaround.patch Type: text/x-diff Size: 1910 bytes Desc: not available Url : http://lists.openidenabled.com/pipermail/dev/attachments/20070117/14e9fc7d/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.openidenabled.com/pipermail/dev/attachments/20070117/14e9fc7d/attachment.pgp From swizard at gmail.com Wed Jan 17 23:51:00 2007 From: swizard at gmail.com (sangho shin) Date: Thu, 18 Jan 2007 16:51:00 +0900 Subject: immediate deny bug in ruby-openid In-Reply-To: <9674d5350701171329n7a971f92p22ff47cd767b123@mail.gmail.com> References: <451b240f0701162001mb4b527ay1c5d9ba5a37fc627@mail.gmail.com> <9674d5350701171329n7a971f92p22ff47cd767b123@mail.gmail.com> Message-ID: <451b240f0701172351m59f9b253k7d79bb5727bebe8e@mail.gmail.com> I just made http://www.myid.net openid service provider using ruby lib. It's for korean :) I didn't know about the bug, until I test with word-press openid plugin which use immediate mode and try to redirect user_setup_url. On 1/18/07, Brian Ellin wrote: > > Sangho, > > You are correct. I'll get this fixed for the next release. > > Also, are you writing a server using the ruby lib, or did you discover > this behaviour testing against an existing server? > > Thanks, > Brian Ellin > brian at janrain.com > > > > On 1/16/07, sangho shin wrote: > > hi. > > I think current implementation of ruby-openid lib has a bug in > > immediate deny answer > > > > if request is immediate , service provider should call resp = > > req.answer(false, server_url) > > in this case, current server.rb implementation set user_setup_url > > 'checkid_immediate'. > > > > I think it should be set 'checkid_setup' instead of 'checkid_immediate > > so that user or consumer can redirect to user_setup_url > > > > > > i just copied source code of server.rb and Server.php. it seems to act > > differently > > > > > > from server.rb > > > > def answer(allow, server_url=nil) > > if allow or @immediate > > mode = 'id_res' > > else > > mode = 'cancel' > > end > > > > response = OpenIDResponse.new(self) > > > > if allow > > response.add_fields(nil, { > > 'mode' => mode, > > 'identity' => @identity, > > 'return_to' => @return_to > > }) > > else > > response.add_field(nil, 'mode', mode, false) > > response.signed.clear > > if @immediate > > unless server_url > > raise ArgumentError, "setup_url is required for > > allow=false in immediate mode" > > end > > # make a request just like this one, but immediate mode > > setup_request = self.class.new('checkid_immediate', > > @identity, > > @return_to, > > @trust_root) > > setup_url = setup_request.encode_to_url(server_url) > > response.add_field(nil, 'user_setup_url', setup_url, false) > > end > > > > end > > > > return response > > end > > > > > > same part of php lib implementation > > > > function answer($allow, $server_url = null) > > { > > if ($allow || $this->immediate) { > > $mode = 'id_res'; > > } else { > > $mode = 'cancel'; > > } > > > > $response = new Auth_OpenID_CheckIDResponse($this, $mode); > > > > if ($allow) { > > $response->fields['identity'] = $this->identity; > > $response->fields['return_to'] = $this->return_to; > > if (!$this->trustRootValid()) { > > return new > Auth_OpenID_UntrustedReturnURL($this->return_to, > > > $this->trust_root); > > } > > } else { > > $response->signed = array(); > > if ($this->immediate) { > > if (!$server_url) { > > return new Auth_OpenID_ServerError(null, > > 'setup_url is required for $allow=false > \ > > in immediate mode.'); > > } > > > > $setup_request =& new Auth_OpenID_CheckIDRequest( > > $this->identity, > > $this->return_to, > > $this->trust_root, > > false, -----------> > > this part will set checkid_setup > > $this->assoc_handle); > > > > $setup_url = $setup_request->encodeToURL($server_url); > > > > $response->fields['user_setup_url'] = $setup_url; > > } > > } > > > > return $response; > > } > > > > _______________________________________________ > > Dev mailing list > > Dev at lists.openidenabled.com > > http://lists.openidenabled.com/mailman/listinfo/dev > > > > _______________________________________________ > Dev mailing list > Dev at lists.openidenabled.com > http://lists.openidenabled.com/mailman/listinfo/dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.openidenabled.com/pipermail/dev/attachments/20070118/8267b0e7/attachment.htm From kevin at radagast.biz Thu Jan 18 08:18:13 2007 From: kevin at radagast.biz (Kevin Jardine) Date: Thu, 18 Jan 2007 17:18:13 +0100 Subject: Missing $_SESSION variable Message-ID: <45AF9DC5.1090506@radagast.biz> I have a Drupal OpenID client which works fine in a PHP 4.3 environment. I recently moved the code to a PHP 5.1.6 environment and it stopped working. In particular, the _openid_consumer_last_token variable that was in the $_SESSION array in handle_login was no longer there in handle_return and the process fails with a "No session state found" error. Has anyone else seen this problem? Is there a PHP configuration option I need to tweak to get $_SESSION variables to work properly? I am using Drupal 4.7.3 in both cases if that helps. Cheers, Kevin -- Kevin Jardine Radagast Solutions Internet campaign advice and magic http://radagast.biz YIM: kevinjardine Skype: kevinjardine Eml: kevin at radagast.biz Tel: +31 (0)6 25581608 From cygnus at janrain.com Thu Jan 18 08:32:17 2007 From: cygnus at janrain.com (Jonathan Daugherty) Date: Thu, 18 Jan 2007 08:32:17 -0800 Subject: Missing $_SESSION variable In-Reply-To: <45AF9DC5.1090506@radagast.biz> References: <45AF9DC5.1090506@radagast.biz> Message-ID: <20070118163217.GM5268@janrain.com> # I recently moved the code to a PHP 5.1.6 environment and it stopped # working. In particular, the _openid_consumer_last_token variable # that was in the $_SESSION array in handle_login was no longer there # in handle_return and the process fails with a "No session state # found" error. Have you verified that your browser is sending the same cookie back to drupal on the return redirect? (Usually PHPSESSID.) (Which browser(s) is/are being tested with this behavior?) Thanks, -- Jonathan Daugherty JanRain, Inc. irc.freenode.net: cygnus in #openid cygnus.myopenid.com From kevin at radagast.biz Thu Jan 18 08:46:05 2007 From: kevin at radagast.biz (Kevin Jardine) Date: Thu, 18 Jan 2007 17:46:05 +0100 Subject: Missing $_SESSION variable In-Reply-To: <20070118163217.GM5268@janrain.com> References: <45AF9DC5.1090506@radagast.biz> <20070118163217.GM5268@janrain.com> Message-ID: <45AFA44D.3040007@radagast.biz> I've used the same browser in all cases - Firefox 2.0.0.1 What I've done is check the $_SESSION variable. The value is there in handle_login and not there in handle_return. I do notice one difference between the two installations is that session.bug_compat_42 is set to "1" on the installation that works and "0" on the installation that does not work. Could that make a difference? Cheers, Kevin Jonathan Daugherty wrote: > # I recently moved the code to a PHP 5.1.6 environment and it stopped > # working. In particular, the _openid_consumer_last_token variable > # that was in the $_SESSION array in handle_login was no longer there > # in handle_return and the process fails with a "No session state > # found" error. > > Have you verified that your browser is sending the same cookie back to > drupal on the return redirect? (Usually PHPSESSID.) (Which > browser(s) is/are being tested with this behavior?) > > Thanks, > -- Kevin Jardine Radagast Solutions Internet campaign advice and magic http://radagast.biz YIM: kevinjardine Skype: kevinjardine Eml: kevin at radagast.biz Tel: +31 (0)6 25581608 From kevin at radagast.biz Thu Jan 18 09:03:09 2007 From: kevin at radagast.biz (Kevin Jardine) Date: Thu, 18 Jan 2007 18:03:09 +0100 Subject: Missing $_SESSION variable In-Reply-To: <45AFA44D.3040007@radagast.biz> References: <45AF9DC5.1090506@radagast.biz> <20070118163217.GM5268@janrain.com> <45AFA44D.3040007@radagast.biz> Message-ID: <45AFA84D.3070402@radagast.biz> I checked the COOKIE value. It contains [PHPSESSID] => qivpm9isnum41rdi2l0gti09p4 in both cases. Cheers, Kevin Kevin Jardine wrote: > I've used the same browser in all cases - Firefox 2.0.0.1 > > What I've done is check the $_SESSION variable. > > The value is there in handle_login and not there in handle_return. > > I do notice one difference between the two installations is that > session.bug_compat_42 is set to "1" on the installation that works and > "0" on the installation that does not work. > > Could that make a difference? > > Cheers, > Kevin > > Jonathan Daugherty wrote: >> # I recently moved the code to a PHP 5.1.6 environment and it stopped >> # working. In particular, the _openid_consumer_last_token variable >> # that was in the $_SESSION array in handle_login was no longer there >> # in handle_return and the process fails with a "No session state >> # found" error. >> >> Have you verified that your browser is sending the same cookie back to >> drupal on the return redirect? (Usually PHPSESSID.) (Which >> browser(s) is/are being tested with this behavior?) >> >> Thanks, >> > > -- Kevin Jardine Radagast Solutions Internet campaign advice and magic http://radagast.biz YIM: kevinjardine Skype: kevinjardine Eml: kevin at radagast.biz Tel: +31 (0)6 25581608 From kevin at radagast.biz Thu Jan 18 09:19:14 2007 From: kevin at radagast.biz (Kevin Jardine) Date: Thu, 18 Jan 2007 18:19:14 +0100 Subject: Missing $_SESSION variable In-Reply-To: <45AFA84D.3070402@radagast.biz> References: <45AF9DC5.1090506@radagast.biz> <20070118163217.GM5268@janrain.com> <45AFA44D.3040007@radagast.biz> <45AFA84D.3070402@radagast.biz> Message-ID: <45AFAC12.4030309@radagast.biz> When I look in the Drupal sessions table I see: a sid of qivpm9isnum41rdi2l0gti09p4 and a session value of _yadis_services__openid_consumer_|s:543:"O:22:"Services_Yadis_Manager":6:{s:12:"starting_url";s:32:"http://kevin.elgg.org/demo/news/";s:9:"yadis_url";s:32:"http://kevin.elgg.org/demo/news/";s:8:"services";a:0:{}s:11:"session_key";s:33:"_yadis_services__openid_consumer_";s:8:"_current";O:27:"Auth_OpenID_ServiceEndpoint":5:{s:12:"identity_url";s:32:"http://kevin.elgg.org/demo/news/";s:10:"server_url";s:55:"http://kevin.elgg.org/demo/mod/openid_server/server.php";s:9:"type_uris";a:1:{i:0;s:28:"http://openid.net/signon/1.0";}s:8:"delegate";N;s:10:"used_yadis";b:0;}s:5:"stale";b:0;}"; If that helps. Kevin Jardine wrote: > I checked the COOKIE value. > > It contains > > [PHPSESSID] => qivpm9isnum41rdi2l0gti09p4 > > in both cases. > > Cheers, > Kevin > > Kevin Jardine wrote: >> I've used the same browser in all cases - Firefox 2.0.0.1 >> >> What I've done is check the $_SESSION variable. >> >> The value is there in handle_login and not there in handle_return. >> >> I do notice one difference between the two installations is that >> session.bug_compat_42 is set to "1" on the installation that works and >> "0" on the installation that does not work. >> >> Could that make a difference? >> >> Cheers, >> Kevin >> >> Jonathan Daugherty wrote: >>> # I recently moved the code to a PHP 5.1.6 environment and it stopped >>> # working. In particular, the _openid_consumer_last_token variable >>> # that was in the $_SESSION array in handle_login was no longer there >>> # in handle_return and the process fails with a "No session state >>> # found" error. >>> >>> Have you verified that your browser is sending the same cookie back to >>> drupal on the return redirect? (Usually PHPSESSID.) (Which >>> browser(s) is/are being tested with this behavior?) >>> >>> Thanks, >>> >> > > -- Kevin Jardine Radagast Solutions Internet campaign advice and magic http://radagast.biz YIM: kevinjardine Skype: kevinjardine Eml: kevin at radagast.biz Tel: +31 (0)6 25581608 From kevin at radagast.biz Thu Jan 18 14:03:41 2007 From: kevin at radagast.biz (Kevin Jardine) Date: Thu, 18 Jan 2007 23:03:41 +0100 Subject: Missing $_SESSION variable In-Reply-To: <45AFAC12.4030309@radagast.biz> References: <45AF9DC5.1090506@radagast.biz> <20070118163217.GM5268@janrain.com> <45AFA44D.3040007@radagast.biz> <45AFA84D.3070402@radagast.biz> <45AFAC12.4030309@radagast.biz> Message-ID: <45AFEEBD.3000206@radagast.biz> I set session.bug_compat_42 to "1" and then discovered that array_merge no longer works as expected with NULL values under PHP 5. I went through my code and made sure that the parameters used with array_merge are never null values and always arrays. That seems to have fixed the problem. I'm not sure if the JanRain code assumes that session.bug_compat_42 is set to "1". Before it was set to "1", if appeared that the $_SESSION values were not being saved properly. Might be worth checking. Cheers, Kevin Kevin Jardine wrote: > When I look in the Drupal sessions table I see: > > a sid of qivpm9isnum41rdi2l0gti09p4 > > and a session value of > > _yadis_services__openid_consumer_|s:543:"O:22:"Services_Yadis_Manager":6:{s:12:"starting_url";s:32:"http://kevin.elgg.org/demo/news/";s:9:"yadis_url";s:32:"http://kevin.elgg.org/demo/news/";s:8:"services";a:0:{}s:11:"session_key";s:33:"_yadis_services__openid_consumer_";s:8:"_current";O:27:"Auth_OpenID_ServiceEndpoint":5:{s:12:"identity_url";s:32:"http://kevin.elgg.org/demo/news/";s:10:"server_url";s:55:"http://kevin.elgg.org/demo/mod/openid_server/server.php";s:9:"type_uris";a:1:{i:0;s:28:"http://openid.net/signon/1.0";}s:8:"delegate";N;s:10:"used_yadis";b:0;}s:5:"stale";b:0;}"; > > If that helps. > > Kevin Jardine wrote: >> I checked the COOKIE value. >> >> It contains >> >> [PHPSESSID] => qivpm9isnum41rdi2l0gti09p4 >> >> in both cases. >> >> Cheers, >> Kevin >> >> Kevin Jardine wrote: >>> I've used the same browser in all cases - Firefox 2.0.0.1 >>> >>> What I've done is check the $_SESSION variable. >>> >>> The value is there in handle_login and not there in handle_return. >>> >>> I do notice one difference between the two installations is that >>> session.bug_compat_42 is set to "1" on the installation that works and >>> "0" on the installation that does not work. >>> >>> Could that make a difference? >>> >>> Cheers, >>> Kevin >>> >>> Jonathan Daugherty wrote: >>>> # I recently moved the code to a PHP 5.1.6 environment and it stopped >>>> # working. In particular, the _openid_consumer_last_token variable >>>> # that was in the $_SESSION array in handle_login was no longer there >>>> # in handle_return and the process fails with a "No session state >>>> # found" error. >>>> >>>> Have you verified that your browser is sending the same cookie back to >>>> drupal on the return redirect? (Usually PHPSESSID.) (Which >>>> browser(s) is/are being tested with this behavior?) >>>> >>>> Thanks, >>>> >> > > -- Kevin Jardine Radagast Solutions Internet campaign advice and magic http://radagast.biz YIM: kevinjardine Skype: kevinjardine Eml: kevin at radagast.biz Tel: +31 (0)6 25581608 From daniel-hofstetter at gmx.ch Fri Jan 19 02:32:25 2007 From: daniel-hofstetter at gmx.ch (Daniel Hofstetter) Date: Fri, 19 Jan 2007 11:32:25 +0100 Subject: Bugfix for minor bug in Services_Yadis_PHPSession Message-ID: <45B09E39.3020406@gmx.ch> Hi all, If I use the PHP OpenID library (and with it Yadis), I get the following error when I run my tests: Unexpected PHP error [array_key_exists(): The second argument should be either an array or an object] severity [E_WARNING] in [/home/dho/projects/cake_1.2.x.x/vendors/Services/Yadis/Manager.php line 40] This error occurs because $_SESSION is empty. So I added a check for emptiness to the "get" function: function get($name, $default=null) { if (!empty($_SESSION) && array_key_exists($name, $_SESSION)) { return $_SESSION[$name]; } else { return $default; } } -- Daniel Hofstetter http://cakebaker.42dh.com From dev-list-openidenabled at thequod.de Wed Jan 24 15:23:06 2007 From: dev-list-openidenabled at thequod.de (dAniel hAhler) Date: Thu, 25 Jan 2007 00:23:06 +0100 Subject: [PHP OpenID]: restore AUTOCOMMIT in SQLStore Message-ID: Hi, in the SQLStore constructor, the following gets done: // Be sure to run the database queries with auto-commit mode // turned OFF, because we want every function to run in a // transaction, implicitly. As a rule, methods named with a // leading underscore will NOT control transaction behavior. // Callers of these methods will worry about transactions. $this->connection->autoCommit(false); Unfortunately, this is likely to conflict with passing in an already established (and globally used) $connection: You would have to manually turn AUTOCOMMIT on again - probably after $consumer->complete() and $consumer->begin() etc. Wouldn't it make more sense to _not_ set AUTOCOMMIT=0 and use BEGIN() instead explicitly?! I hope this makes sense?! From cygnus at janrain.com Wed Jan 24 15:36:02 2007 From: cygnus at janrain.com (Jonathan Daugherty) Date: Wed, 24 Jan 2007 15:36:02 -0800 Subject: [PHP OpenID]: restore AUTOCOMMIT in SQLStore In-Reply-To: References: Message-ID: <20070124233601.GL15812@janrain.com> # Unfortunately, this is likely to conflict with passing in an already # established (and globally used) $connection: You would have to # manually turn AUTOCOMMIT on again - probably after # $consumer->complete() and $consumer->begin() etc. It's true that we wrote that code assuming we'd get our very own db connection. The safest thing to do would be to store the original autocommit state and reset it after we're done, although I don't see a way in PEAR DB to get the current autocommit state. (If you know of it, please submit a patch. I'm not in the mood to print_r($conn) to find out where it lives, if it lives at all.) # Wouldn't it make more sense to _not_ set AUTOCOMMIT=0 and use # BEGIN() instead explicitly?! Well, there is no "begin()" method of the DB class, and the overall design of DB would imply that issuing a BEGIN query manually is not a good idea as the transaction state is managed for you internally. In order to know that commit() and rollback() calls actually mean anything, it's *necessary* to turn auto-commit mode off. -- Jonathan Daugherty JanRain, Inc. irc.freenode.net: cygnus in #openid cygnus.myopenid.com From cygnus at janrain.com Wed Jan 24 15:37:33 2007 From: cygnus at janrain.com (Jonathan Daugherty) Date: Wed, 24 Jan 2007 15:37:33 -0800 Subject: Bugfix for minor bug in Services_Yadis_PHPSession In-Reply-To: <45B09E39.3020406@gmx.ch> References: <45B09E39.3020406@gmx.ch> Message-ID: <20070124233732.GM15812@janrain.com> # Unexpected PHP error [array_key_exists(): The second argument should be # either an array or an object] severity [E_WARNING] in # [/home/dho/projects/cake_1.2.x.x/vendors/Services/Yadis/Manager.php line 40] # # This error occurs because $_SESSION is empty. So I added a check for # emptiness to the "get" function: It seems to me that this is because session_start() has not been called. That code is otherwise valid, because it assumes $_SESSION exists and is at the very least == array(), in which case no empty() check is necessary. What do you think? -- Jonathan Daugherty JanRain, Inc. irc.freenode.net: cygnus in #openid cygnus.myopenid.com From cygnus at janrain.com Wed Jan 24 15:46:38 2007 From: cygnus at janrain.com (Jonathan Daugherty) Date: Wed, 24 Jan 2007 15:46:38 -0800 Subject: Missing $_SESSION variable In-Reply-To: <45AFEEBD.3000206@radagast.biz> References: <45AF9DC5.1090506@radagast.biz> <20070118163217.GM5268@janrain.com> <45AFA44D.3040007@radagast.biz> <45AFA84D.3070402@radagast.biz> <45AFAC12.4030309@radagast.biz> <45AFEEBD.3000206@radagast.biz> Message-ID: <20070124234638.GN15812@janrain.com> # I set session.bug_compat_42 to "1" and then discovered that # array_merge no longer works as expected with NULL values under PHP # 5. I went through my code and made sure that the parameters used # with array_merge are never null values and always arrays. # # That seems to have fixed the problem. Hi Kevin, Thanks for letting me know about this. Php.net has this rather cryptic bit to say about bug_compat_42: PHP versions 4.2.3 and lower have an undocumented feature/bug that allows you to initialize a session variable in the global scope, albeit register_globals is disabled. PHP 4.3.0 and later will warn you, if this feature is used, and if session.bug_compat_warn is also enabled. This feature/bug can be disabled by disabling this directive. I don't know what "initialize a session variable in the global scope" even means. Do you? (It's probably something from PHP's dark past that I *don't* want to know is possible.) I'm not sure how this affects our libraries specifically. Our code actually makes no assumption one way or the other. (Rather, it assumes sane behavior.) I know that in my PHP configuration (both apache and cli), bug_compat_42 is set to 1. However, I'm not sure it has ever had any bearing on what I expect my code to do. (So, I would love some clarification on the nature of this, if you can provide it.) Thanks again, -- Jonathan Daugherty JanRain, Inc. irc.freenode.net: cygnus in #openid cygnus.myopenid.com From dev-list-openidenabled at thequod.de Wed Jan 24 16:00:49 2007 From: dev-list-openidenabled at thequod.de (dAniel hAhler) Date: Thu, 25 Jan 2007 01:00:49 +0100 Subject: [PHP OpenID]: restore AUTOCOMMIT in SQLStore In-Reply-To: <20070124233601.GL15812@janrain.com> References: <20070124233601.GL15812@janrain.com> Message-ID: 2007/1/25, Jonathan Daugherty : > # Unfortunately, this is likely to conflict with passing in an already > # established (and globally used) $connection: You would have to > # manually turn AUTOCOMMIT on again - probably after > # $consumer->complete() and $consumer->begin() etc. > > It's true that we wrote that code assuming we'd get our very own db > connection. The safest thing to do would be to store the original > autocommit state and reset it after we're done, although I don't see a > way in PEAR DB to get the current autocommit state. (If you know of > it, please submit a patch. I'm not in the mood to print_r($conn) to > find out where it lives, if it lives at all.) According to http://pear.php.net/package/DB/download/1.7.0RC1 there's a property autoCommit / autocommit, which would hold this value. >From looking at PHP-OpenID uses (e.g. different plugins), most seem to just not implement the autoCommit() method and therefor it will not get changed at all. That's what I've done now, too. > > # Wouldn't it make more sense to _not_ set AUTOCOMMIT=0 and use > # BEGIN() instead explicitly?! > > Well, there is no "begin()" method of the DB class, and the overall > design of DB would imply that issuing a BEGIN query manually is not a > good idea as the transaction state is managed for you internally. > > In order to know that commit() and rollback() calls actually mean > anything, it's *necessary* to turn auto-commit mode off. I see. I don't know the PEAR::DB class really. We're using an ezSQL derived class in our project. From cygnus at janrain.com Wed Jan 24 16:03:35 2007 From: cygnus at janrain.com (Jonathan Daugherty) Date: Wed, 24 Jan 2007 16:03:35 -0800 Subject: [PHP OpenID]: restore AUTOCOMMIT in SQLStore In-Reply-To: References: <20070124233601.GL15812@janrain.com> Message-ID: <20070125000335.GO15812@janrain.com> # According to http://pear.php.net/package/DB/download/1.7.0RC1 # there's a property autoCommit / autocommit, which would hold this # value. Do you think I can assume that 1.7.0RC1 is going to be widely deployed? :) (Thanks for the info, though.) # From looking at PHP-OpenID uses (e.g. different plugins), most seem # to just not implement the autoCommit() method and therefor it will # not get changed at all. That's what I've done now, too. That seems fine to me. -- Jonathan Daugherty JanRain, Inc. irc.freenode.net: cygnus in #openid cygnus.myopenid.com From dev-list-openidenabled at thequod.de Wed Jan 24 17:05:26 2007 From: dev-list-openidenabled at thequod.de (dAniel hAhler) Date: Thu, 25 Jan 2007 02:05:26 +0100 Subject: [PHP OpenID]: restore AUTOCOMMIT in SQLStore In-Reply-To: <20070125000335.GO15812@janrain.com> References: <20070124233601.GL15812@janrain.com> <20070125000335.GO15812@janrain.com> Message-ID: 2007/1/25, Jonathan Daugherty : > # According to http://pear.php.net/package/DB/download/1.7.0RC1 > # there's a property autoCommit / autocommit, which would hold this > # value. > > Do you think I can assume that 1.7.0RC1 is going to be widely > deployed? :) (Thanks for the info, though.) As far as I understood it's named autoCommit before 1.7.0RC1 and autocommit afterwards (and you would have to test for both). But maybe it got just introduced in some 1.7-beta though. From kevin at radagast.biz Wed Jan 24 23:58:50 2007 From: kevin at radagast.biz (Kevin Jardine) Date: Thu, 25 Jan 2007 08:58:50 +0100 Subject: Missing $_SESSION variable In-Reply-To: <20070124234638.GN15812@janrain.com> References: <45AF9DC5.1090506@radagast.biz> <20070118163217.GM5268@janrain.com> <45AFA44D.3040007@radagast.biz> <45AFA84D.3070402@radagast.biz> <45AFAC12.4030309@radagast.biz> <45AFEEBD.3000206@radagast.biz> <20070124234638.GN15812@janrain.com> Message-ID: <45B8633A.1020605@radagast.biz> Hi Jonathan, I have not had the chance to compare the behaviour with this flag turned off or on. However, I did discover that a bug in my code related to a PHP 5 incompatibility was causing the code to run after a perfectly correct del('_openid_consumer_last_token') function call in the JanRain library. I believe that this was the reason that this variable was missing from $_SESSION. So I think that this problem was related to a problem with my code rather than the JanRain library. My apologies if I've wasted your time. Cheers, Kevin Jonathan Daugherty wrote: > # I set session.bug_compat_42 to "1" and then discovered that > # array_merge no longer works as expected with NULL values under PHP > # 5. I went through my code and made sure that the parameters used > # with array_merge are never null values and always arrays. > # > # That seems to have fixed the problem. > > Hi Kevin, > > Thanks for letting me know about this. > > Php.net has this rather cryptic bit to say about bug_compat_42: > > PHP versions 4.2.3 and lower have an undocumented feature/bug that > allows you to initialize a session variable in the global scope, > albeit register_globals is disabled. PHP 4.3.0 and later will warn > you, if this feature is used, and if session.bug_compat_warn is also > enabled. This feature/bug can be disabled by disabling this > directive. > > I don't know what "initialize a session variable in the global scope" > even means. Do you? (It's probably something from PHP's dark past > that I *don't* want to know is possible.) I'm not sure how this > affects our libraries specifically. Our code actually makes no > assumption one way or the other. (Rather, it assumes sane behavior.) > > I know that in my PHP configuration (both apache and cli), > bug_compat_42 is set to 1. However, I'm not sure it has ever had any > bearing on what I expect my code to do. (So, I would love some > clarification on the nature of this, if you can provide it.) > > Thanks again, > -- Kevin Jardine Radagast Solutions Internet campaign advice and magic http://radagast.biz YIM: kevinjardine Skype: kevinjardine Eml: kevin at radagast.biz Tel: +31 (0)6 25581608 From dev-list-openidenabled at thequod.de Thu Jan 25 15:15:04 2007 From: dev-list-openidenabled at thequod.de (dAniel hAhler) Date: Fri, 26 Jan 2007 00:15:04 +0100 Subject: OpenID-simplereg: Split openid.sreg.fullname into .forename and .surname Message-ID: Hello, IMHO it would be better to have separate fields for "First name" and "Last name" (forename and surename). You can always build fullname out of this, but not the other way around reliably. What do you think? From kevin at janrain.com Thu Jan 25 15:48:00 2007 From: kevin at janrain.com (Kevin Turner) Date: Thu, 25 Jan 2007 15:48:00 -0800 Subject: OpenID-simplereg: Split openid.sreg.fullname into .forename and .surname In-Reply-To: References: Message-ID: <1169768880.5733.407.camel@localhost> On Fri, 2007-01-26 at 00:15 +0100, dAniel hAhler wrote: > Hello, > > IMHO it would be better to have separate fields for "First name" and > "Last name" (forename and surename). Names get pretty complicated pretty fast. Sure, it's just first and last, you say. But what about middle names? Multiple middle names? Titles? Suffixes? Structure and presentation of names also varies by culture. That's why we decided the *simple* registration extension would just have one fullname field, and anything with more complex requirements could be served by something not called "simple." From kevin at radagast.biz Thu Jan 25 23:05:56 2007 From: kevin at radagast.biz (Kevin Jardine) Date: Fri, 26 Jan 2007 08:05:56 +0100 Subject: OpenID-simplereg: Split openid.sreg.fullname into .forename and .surname In-Reply-To: <1169768880.5733.407.camel@localhost> References: <1169768880.5733.407.camel@localhost> Message-ID: <45B9A854.4070300@radagast.biz> As a concrete example, in the Netherlands, many people have Tussenvoegsels (eg. "van", "de") which are technically part of the last name, but are not counted as such for sorting. Eg. "Van Dyke" is found under "D" in Dutch phone books. In Hong Kong, many people adopt English given names, and the order of the name depends upon the first name. If the given name is an English name, it typically comes first, but if it is Chinese, it typically comes last. There are exceptions, however. Some Chinese citizens prefer to reverse their Chinese names in an international context, and some do not. In some countries, eg. Mongolia and parts of Indonesia, people traditionally do not have last names. In Iceland, there is something a bit like a last name, but it varies from family member to family member based on gender. And so on. The "firstname lastname" model is actually restricted only to a few cultures. Cheers, Kevin Kevin Turner wrote: > On Fri, 2007-01-26 at 00:15 +0100, dAniel hAhler wrote: >> Hello, >> >> IMHO it would be better to have separate fields for "First name" and >> "Last name" (forename and surename). > > Names get pretty complicated pretty fast. Sure, it's just first and > last, you say. But what about middle names? Multiple middle names? > Titles? Suffixes? Structure and presentation of names also varies by > culture. That's why we decided the *simple* registration extension > would just have one fullname field, and anything with more complex > requirements could be served by something not called "simple." > > > > _______________________________________________ > Dev mailing list > Dev at lists.openidenabled.com > http://lists.openidenabled.com/mailman/listinfo/dev > > > -- Kevin Jardine Radagast Solutions Internet campaign advice and magic http://radagast.biz YIM: kevinjardine Skype: kevinjardine Eml: kevin at radagast.biz Tel: +31 (0)6 25581608 From kevin at radagast.biz Thu Jan 25 23:53:31 2007 From: kevin at radagast.biz (Kevin Jardine) Date: Fri, 26 Jan 2007 08:53:31 +0100 Subject: OpenID-simplereg: Split openid.sreg.fullname into .forename and .surname In-Reply-To: <45B9A854.4070300@radagast.biz> References: <1169768880.5733.407.camel@localhost> <45B9A854.4070300@radagast.biz> Message-ID: <45B9B37B.2020507@radagast.biz> I forgot to mention that the name order is not only an issue in Asia. In Hungary, the family name is also written before the given name. See: http://en.wikipedia.org/wiki/Hungarian_name Cheers, Kevin Kevin Jardine wrote: > As a concrete example, in the Netherlands, many people have > Tussenvoegsels (eg. "van", "de") which are technically part of the last > name, but are not counted as such for sorting. Eg. "Van Dyke" is found > under "D" in Dutch phone books. > > In Hong Kong, many people adopt English given names, and the order of > the name depends upon the first name. If the given name is an English > name, it typically comes first, but if it is Chinese, it typically comes > last. There are exceptions, however. Some Chinese citizens prefer to > reverse their Chinese names in an international context, and some do not. > > In some countries, eg. Mongolia and parts of Indonesia, people > traditionally do not have last names. > > In Iceland, there is something a bit like a last name, but it varies > from family member to family member based on gender. > > And so on. > > The "firstname lastname" model is actually restricted only to a few > cultures. > > Cheers, > Kevin > > Kevin Turner wrote: >> On Fri, 2007-01-26 at 00:15 +0100, dAniel hAhler wrote: >>> Hello, >>> >>> IMHO it would be better to have separate fields for "First name" and >>> "Last name" (forename and surename). >> Names get pretty complicated pretty fast. Sure, it's just first and >> last, you say. But what about middle names? Multiple middle names? >> Titles? Suffixes? Structure and presentation of names also varies by >> culture. That's why we decided the *simple* registration extension >> would just have one fullname field, and anything with more complex >> requirements could be served by something not called "simple." >> >> >> >> _______________________________________________ >> Dev mailing list >> Dev at lists.openidenabled.com >> http://lists.openidenabled.com/mailman/listinfo/dev >> >> >> > > -- Kevin Jardine Radagast Solutions Internet campaign advice and magic http://radagast.biz YIM: kevinjardine Skype: kevinjardine Eml: kevin at radagast.biz Tel: +31 (0)6 25581608 From l4igem2 at list.ru Fri Jan 26 04:46:26 2007 From: l4igem2 at list.ru (Sergey Shepelev) Date: Fri, 26 Jan 2007 15:46:26 +0300 Subject: index.php/serve over FastCGI problem Message-ID: <1268164493.20070126154626@list.ru> Hello. I'm using nginx webserver and PHP/fastcgi to run OpenID server. I encountered problem when user requests an URI like page.php/path?param=value. It doesn't get served by PHP. Possibly it is a httpd-php connection problem but either way... is this thing really a must? Can I change index.php/serve to something like index.php?serve=1 in all files? (With changing index.php request handlers 'if' statement as well). Won't this break compatibility with OpenID clients? -- ? ?????????, ?????? ?. ???????. mailto:l4igem2 at list.ru ICQ: 145-542-767 From simon at simonwillison.net Sat Jan 27 08:16:46 2007 From: simon at simonwillison.net (Simon Willison) Date: Sat, 27 Jan 2007 16:16:46 +0000 Subject: Python library: getRetryURL equivalent in v1.2.0 Message-ID: Hi all, Version 1.0.5 of the Python OpenID library included a useful set of functionality for retrying OpenID authentication (for example, if the user wasn't originally signed in to their identity provider). In particular, there was a method called getRetryURL() This method no longer exists in version 1.2.0 of the library. What is the expected way of duplicating this functionality? As an aside, the browsable documentation on openidenabled.com is out of date - it's still the docs for the previous version of the library. Cheers, Simon