Reputation: 133
I get an Exception on my production server when i try to instanciate the class "OAuthProvider" from pecl package oauth.
try {
$oauth = new OAuthProvider();
} catch(Exception $e) {
// Get the error here
}
The error message is : "Unknown signature method"
Have anyone got this error ?
Upvotes: 1
Views: 768
Reputation: 31078
This is PHP bug #68168 - some servers have an empty $_SERVER[HTTP_AUTHORIZATION]
value, which is not correctly detected by the php oauth extension.
Upvotes: 0
Reputation: 42
OAuthProvider looks for the oauth_signature_method in either the Authorization header or REQUEST params (respectively) if you run a non-CLI SAPI.
Under the CLI SAPI you can set the parameters in the ctor:
$op = new OAuthProvider(array("oauth_signature_method" => OAUTH_SIG_METHOD_HMACSHA1));
Upvotes: 1