christian.stocker at bitflux.ch
Thu Sep 8 09:44:10 PDT 2005
On 8.9.2005 18:28 Uhr, Dan Libby wrote:
> Hi Christian. Thanks for the report. I'll play around without the
> extensions and SCRIPT_URI to make sure the examples still work.
> One thing though... I already applied the SCRIPT_URI patch from Martin
> Atkins. You are saying you had to make additional changes? What were
Attached is the patch. The first part is not totally correct as far as I
can see, but you know now, where to look for. And the second part in
sampleserver.php is only my hardcoded URL :) Hope it helps nevertheless.
by the way, I took your library and integrated OpenID support in our
CMS. It's only a server yet (and basically just your sampleserver.php
with the authentication from our framework). Should also be a consumer
for more details
Thanks a lot for the library and I wanted to start with an AJAX demo,
but didn't get very far. The JS part isn't the problem, but the helper
part as in http://danga.com/openid/demo/helper.bml.txt. I have no idea
where to start for that :)
> Christian Stocker wrote:
>>On 8.9.2005 11:33 Uhr, Dan Libby wrote:
>>>Just a minor bugfix release.
>>>fwiw, I've now tested both simple.php and httpconsumer.php with
>>>Livejournal, and achieved successful logins with both using this version.
>>Nice. Works (simple, httpconsumer and sampleserver), if I install your
>>recommended extension (gmp, mhash, curl, and tidy2). Without gmp and
>>mhash it didn't work, but I'm too busy/lazy right now to check that
>>further. As long as it works for me :)
>>Furthermore there's the issue of SCRIPT_URI, which is not set on my
>>server (apache2, mod_php5, linux) and I had to change some lines
>>(mentioned in the mail by Martin Atkins).
>>Now that the examples work, I'll try to integrate them into our
>>applications. Thanks a lot for your work
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
http://www.bitflux.ch | christian.stocker at bitflux.ch | GPG 0x5CE1DECB
-------------- next part --------------
diff -u ../../PHP-OpenID-0.0.8.2/examples/httpconsumer.php ./httpconsumer.php
--- ../../PHP-OpenID-0.0.8.2/examples/httpconsumer.php 2005-09-06 08:26:44.000000000 +0200
+++ ./httpconsumer.php 2005-09-08 12:14:56.000000000 +0200
@@ -364,7 +364,7 @@
$consumer = new SampleConsumer($http_client, $assoc_mngr);
// print 'Consumer Server running...'
- $handler = new ConsumerHandler( $consumer, $_SERVER['SCRIPT_URI'], $split, $dumb );
+ $handler = new ConsumerHandler( $consumer,isset($_SERVER['SCRIPT_URI']) ? $_SERVER['SCRIPT_URI'] : 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'], $split, $dumb );
diff -u ../../PHP-OpenID-0.0.8.2/examples/sampleserver.php ./sampleserver.php
--- ../../PHP-OpenID-0.0.8.2/examples/sampleserver.php 2005-09-06 08:26:38.000000000 +0200
+++ ./sampleserver.php 2005-09-08 18:37:26.000000000 +0200
@@ -38,8 +38,7 @@
require_once( '../openid/server.php' );
require_once( '../openid/association.php' );
-define( 'addr', isset( $_SERVER['PATH_INFO'] ) ? str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['SCRIPT_URI'] ) : $_SERVER['SCRIPT_URI'] );
// define some paths to be used for maintaining state in this example server.
// May need to adjust for non-unix OS. Will attempt to create if not pre-existing.
More information about the yadis