Bug #70217 [NEW]: cURL Malformed URL Exception with OAuth
| From: | twOauth at mailinator dot com | Date: | Sat, 08 Aug 2015 23:13:50 +0000 |
| Subject: | Bug #70217 [NEW]: cURL Malformed URL Exception with OAuth | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-195038@lists.php.net to get a copy of this message | ||
From: twOauth at mailinator dot com
Operating system: OSX 10.10.5
PHP version: 5.5.28
Package: *General Issues
Bug Type: Bug
Bug description:cURL Malformed URL Exception with OAuth
Description:
------------
On OSX 10.10.5, I created a clean install of Twitter OAuth using
composer
https://github.com/abraham/twitteroauth
and ran the test script below with a valid CONSUMER_KEY, CONSUMER_SECRET
(validated using the Twitter OAuth tool that returns the expected
result).
php -S localhost:1234
PHP version is PHP 5.5.27 (cli) (built: Jul 23 2015 00:21:59)
Test script:
---------------
<?php
require "vendor/autoload.php";
use Abraham\TwitterOAuth\TwitterOAuth;
define('CONSUMER_KEY', '...');
define('CONSUMER_SECRET', '..');
define('OAUTH_CALLBACK', 'test2.php');
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);
$request_token = $connection->oauth('oauth/request_token',
array('oauth_callback' => OAUTH_CALLBACK));
?>
Expected result:
----------------
The script should above should return an oauth token.
Actual result:
--------------
/test.php - Uncaught exception
'Abraham\TwitterOAuth\TwitterOAuthException' in
/Users/username/Dev/twitter/vendor/abraham/twitteroauth/src/TwitterOAuth.php:141
Stack trace:
#0 /Users/username/Dev/twitter/test.php(12):
Abraham\TwitterOAuth\TwitterOAuth->oauth('oauth/request_t...', Array)
#1 {main}
thrown in
/Users/username/Dev/twitter/vendor/abraham/twitteroauth/src/TwitterOAuth.php
on line 141
$curlErrno = curl_errno($curlHandle);
var_dump($curlErrno);
results in int(3), which from
http://php.net/manual/en/function.curl-errno.php
is [3] =>
'CURLE_URL_MALFORMAT'.
Note this issue does not occur on PHP 5.6.11 (cli) (built: Jul 10 2015
22:36:04).
--
Edit bug report at https://bugs.php.net/bug.php?id=70217&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70217&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70217&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70217&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70217&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70217&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70217&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70217&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70217&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70217&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70217&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70217&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70217&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70217&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70217&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70217&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70217&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70217&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70217&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70217&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70217&r=mysqlcfg