This module has a namespace conflict with the official (according to Rasmus anyway) PHP OAuth implementation:

http://us.php.net/oauth

They both declare the same exception class.

Ideally it'd be nice to use the PECL libaray: it's compiled C and much more up to date than the old OAuth.php you're bundling. However, in the mean time this patch resolves the conflict on hosts that have PHP's OAuth extension included.

CommentFileSizeAuthor
pecl_oauth.patch348 bytesjoshk
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

eiriksm’s picture

Status: Active » Needs review

Tested on both environment without the OAuth extension and with the extension.

Small, clean patch, works great!

Would love to see this commited.

Thanks, Josh!

jobeirne’s picture

Joshk,

Thanks for the attention and the patch. You're touching on something that's my number one priority with the OAuth module right now: getting OAuth-proper the hell out of this codebase and setting up libraries integration to allow use of the official OAuth library.

I'll test and commit this as a stopgap in the meantime.

Out of curiosity: does the official OAuth library work with this patch without further modifications to this module? That information may save me some time when refactoring out the old OAuth code.

Thanks again for your help.

James

steinmb’s picture

Hi James
Does your 'number ono' task also got an issue number? Glad to hear there work i progress on dropping the lib. :)

jobeirne’s picture

Indeed it does! You can see the issue I've created here: http://drupal.org/node/1433274

idflood’s picture

The patch is working nicely, thanks @joshk. My production server had the PECL libaray installed while the local machine didn't. Before it worked locally but not on prod, after applying the patch it is working on both config.

iamEAP’s picture

Status: Needs review » Reviewed & tested by the community

+1 for RTBC.

juampynr’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

Sorry guys, the issue #1433274: Decouple OAuth code from Drupal module via Libraries API got fixed already in the development versions so the OAuth module is not hosting the library anymore.

Now is time to start working in replacing http://oauth.googlecode.com/svn/code/php by the PHP PECL library. This will be done at #1591692: Replace current OAuth library. Help on this task is much appreciated!

Cheers