simbor / google-api-adwords-php

Automatically exported from code.google.com/p/google-api-adwords-php
Apache License 2.0
0 stars 0 forks source link

OAuth - Invalid auth/bad request (got a 411, expected HTTP/1.1 20X or a redirect) #56

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Which version of the library are you using?
v201101

Which version of PHP are you using?
PHP 5.3.6 

What steps will reproduce the problem?
* Download the sample application (ensuring that cURL, OpenSSL and OAuth) are 
all installed
* Verify that the /src/* folder appears in the path (no errors)
* Open application via a web browser
* Press the login button

What is the expected output? What do you see instead?
* This should prompt for an OAuth token workflow
* Istead, an error appears:

   An error has occurred: Invalid auth/bad request (got a 411, expected HTTP/1.1 20X or a redirect)

Please provide any additional information below.

This is actually an error I've had on two different machines (both Macs running 
MacPorts + Apache2). I have a much bigger implementation of the API planned, 
but I can't get past this error.

Original issue reported on code.google.com by yeargin...@gmail.com on 12 May 2011 at 4:29

Attachments:

GoogleCodeExporter commented 8 years ago
It looks like an issue with something in oauth v1.1.0.  If you install v1.0.0 
it works fine.

pecl uninstall oauth
pecl install oauth-1.0.0

Original comment by llank...@gmail.com on 14 May 2011 at 8:28

GoogleCodeExporter commented 8 years ago
No luck.

OAuth

OAuth support => enabled
PLAINTEXT support => enabled
RSA-SHA1 support => not supported
HMAC-SHA1 support => enabled
Request engine support => php_streams, curl
source version => $Id: oauth.c 308061 2011-02-06 17:15:34Z jawed $
version => 1.0-dev

Still having the same trouble.

Original comment by step...@raventools.com on 14 May 2011 at 8:33

GoogleCodeExporter commented 8 years ago
Here's my OAuth details from phpinfo() after switching to v1.0.0 which fixed 
the issue for me. I'm running PHP 5.3.6 on a CentOS VM.

OAuth

OAuth support           enabled
PLAINTEXT support   not supported
RSA-SHA1 support    enabled
HMAC-SHA1 support   enabled
Request engine support  php_streams
source version          $Id: oauth.c 300018 2010-06-01 01:50:41Z datibbaw $
version                 1.0-dev

Good luck.

Original comment by llank...@gmail.com on 14 May 2011 at 8:39

GoogleCodeExporter commented 8 years ago
I've re-compiled the module from ./trunk and it suddenly is working (with 1.1). 
I suspect that the issue will be addressed in the next release. I'm stilling 
getting 'cookie invalid' errors, but I had those with AuthSub (might be related 
to switching from HTTPS between servers).

Final resolution on this ticket would be set the requirements to certain builds 
of the OAuth module to 1.0 with known compatibility issues in 1.1.

Original comment by step...@raventools.com on 16 May 2011 at 1:52

GoogleCodeExporter commented 8 years ago
I'll update the README to reflect this.

Original comment by ekoleda+devrel@googlers.com on 16 May 2011 at 2:57

GoogleCodeExporter commented 8 years ago
A workaround was implemented in r178 that will allow the code to work with the 
1.1.0 release. I used OAUTH_AUTH_TYPE_URI for the token requests, and 
OAUTH_AUTH_TYPE_AUTHORIZATION when generating the signature.

Original comment by ekoleda+devrel@googlers.com on 7 Jun 2011 at 8:15

GoogleCodeExporter commented 8 years ago
php5-oauth 1.2 has been released and fix this issue!

Original comment by ghu...@gmail.com on 12 Jul 2011 at 9:15