On attempts to login (which result in a failure - I'm not even redirected to the provider login), I see the following error in the Drupal log:

bccomp() expects parameter 1 to be string, resource given in /usr/local/share/drupal-6.22/modules/openid/openid.inc on line 297.

I make no pretensions to actually understanding the math, but after trial and error, the attached patch solved my problem.

Comments

jmcclelland’s picture

StatusFileSize
new564 bytes

Woops - uploaded the wrong patch. Attached is a safer patch.

anarcat’s picture

Title: bccomp error » bccomp error if the gmp library is installed
Status: Active » Fixed

To be honest, I don't understand this either. It looks like the openid_provider code went ahead of the Drupal core one and supported both library functions while the core one didn't.

The result of that function get passed to _openid_dh_long_to_binary, which uses the bccomp() and friends functions, but since the provider code prioritizes the gmp library (and core doesn't support that), it fails if you have the gmp library installed.

I think your fix is a good workaround, but not a proper patch. :) Please try 1e3d421b5f2ea57ccf9370e1d0e0a8df5a64a017 or the dev snapshot of D6. Also committed to D7.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.