Re: Re: Possible bug in PHP 5.3.5 with OAuth extension?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ok, I'm such a dud. Looks like someone had already reported this exact bug
http://pecl.php.net/bugs/bug.php?id=22485

I actually was looking at the problematic method in the source, but didn't
catch the problem. But now that someone has pointed it out, it's so obvious.
I deserve a slap on the back of my head!

I've gone and install version 1.0.0 for the time being, seems to be working
fine.

-daniel

On Fri, Mar 4, 2011 at 6:19 PM, Daniel Hong <daniel@xxxxxxxxxxxxxx> wrote:

> Hi Jim,
>
> I'm using oauth to connect to Dropbox. The OAuth::getRequestToken() and OAuth::getAccessToken()
> works without a problem since (assuming) those are sent over the wire as a
> GET request. When I try to issue a fetch command, for example:
>
> $oauth->enableDebug()
> $oauth->fetch('https://api.dropbox.com/0/account', array(),
> OAUTH_HTTP_METHOD_POST);
> print_r($oauth->debugInfo);
>
> In the debug info, the SBS string is showing that the http request method
> was GET, not POST.
>
> When I execute the same code on a machine running PHP 5.3.2, the SBS string
> shows POST.
>
> I took a look at the source for the oauth extension, it looks like requests
> could be made with PHP streams or with curl, but I couldn't tell what was
> the default. There is an OAuth::setRequestEngine() which you can pass in a
> constant for using either PHP streams or curl. The constant for using curl
> (OAUTH_REQENGINE_CURL) doesn't exist. When I try to print the constant, it
> just shows the "undefined" error message. I have the latest version of the
> oauth extension installed, so not sure what's wrong.
>
> When I view phpinfo, under oauth, it shows "Request engine support" is
> php_streams. But I'm not sure this entirely matters since on the server that
> does work, phpinfo shows that "Request engine support" is also php_streams.
>
> On a side question, why is it only showing that php_streams is supported?
> Why not curl as well? The php curl package is installed...
>
> Thanks,
> daniel
>
>
> On Fri, Mar 4, 2011 at 5:30 PM, Jim Lucas <lists@xxxxxxxxx> wrote:
>
>> On 3/4/2011 5:18 PM, Daniel Hong wrote:
>> > Correction:
>> >
>> > I stated the incorrect version of PHP that does not seem to have this
>> issue.
>> > The version of PHP that works correctly is 5.3.2, not 5.3.3.
>>
>> Can you give us an example of what you are doing?
>>
>> Jim Lucas
>>
>> >
>> > Thanks,
>> > daniel
>> >
>> > On Fri, Mar 4, 2011 at 11:40 AM, Daniel Hong <daniel@xxxxxxxxxxxxxx>
>> wrote:
>> >
>> >> Hello,
>> >>
>> >> I'm using the PHP OAuth extension and running into a strange issue. I'm
>> not
>> >> sure if it's a bug in PHP 5.3.5, or if it's a bug in the OAuth
>> extension
>> >> when installed on a system with PHP 5.3.5.
>> >>
>> >> On a machine with PHP 5.3.5, when I call OAuth::fetch() with http
>> method of
>> >> POST, the debug info is showing that it is sending as a GET request. As
>> a
>> >> result, the resource that I'm fetching returns with failure since it
>> will
>> >> only respond to a POST request. I tested this out on two different
>> machines,
>> >> and getting the same result on both. One machine is Ubuntu 10.04 with
>> nginx
>> >> 0.8.54 and PHP 5.3.5. The other is CentOS 5.5 with apache 2.2 and PHP
>> 5.3.5.
>> >>
>> >> I have another Ubuntu 10.04 machine with PHP 5.3.3, and I am not having
>> >> this issue on that machine. The OAuth debug info is correctly showing
>> http
>> >> method of POST.
>> >>
>> >> I guess I'll need to use PHP 5.3.3 in the mean time, but it would be
>> great
>> >> to know what the problem is.
>> >>
>> >> Thanks,
>> >> daniel
>> >>
>> >
>>
>>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux