Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

curl_getinfo not (yet) supported #1

Open
gerbz opened this issue Feb 25, 2014 · 10 comments
Open

curl_getinfo not (yet) supported #1

gerbz opened this issue Feb 25, 2014 · 10 comments
Assignees

Comments

@gerbz
Copy link

gerbz commented Feb 25, 2014

1st off - purl is saving my day so TY =)

Im using purl on AppEngine to overcome a few hurdles with API's I use. I'm seeing the warning regarding curl_getinfo but I'm not sure that I'm even using getinfo anywhere? here's the warning:

Warning: curl_getinfo is not (yet) supported by pUrl in /path/to/purl/functions.php on line 117

I just commented out 117 for now - so no biggie.

@azayarni
Copy link
Owner

Hey, I can add basic support for the function. But I cannot promise to implement support all the curl options for it. Would be nice to know, which (of these http://de3.php.net/manual/en/function.curl-getinfo.php) constants are used by your application.

@gerbz
Copy link
Author

gerbz commented Feb 26, 2014

I'm not even sure where curl_getinfo was being called from... the error only stated the line in purl.

I was trying to get the CoinBase and WePay php libraries to work on GAE. No luck though =( Had to give in:
https://github.com/coinbase/coinbase-php/tree/master/lib
https://github.com/wepay/PHP-SDK/blob/master/wepay.php

@gerbz
Copy link
Author

gerbz commented Feb 26, 2014

Looks like curl_getinfo is used often with OAUTH related libraries. Sofar the only constant I've seen used for curl_getinfo is CURLINFO_HTTP_CODE.

@azayarni
Copy link
Owner

Ok, it is easy. I'll implement it.

@gerbz
Copy link
Author

gerbz commented Feb 26, 2014

Great. Although...
I've spend all day and failed to get either WePay or CoinBase API's to work. I hardcode the response code so thats not the problem. Both API's respond with an empty body so its impossible to debug whats happening.

Maybe they are expecting the request to come posted using cUrl? I dunno. Very frustrating.

@heisenbol
Copy link

it seems I have the same issue with google app engine. I try to use opauth with the twitter strategy. It makes 2 times use of curl_getinfo

$c = curl_init();
....
$code = curl_getinfo($c, CURLINFO_HTTP_CODE);
$info = curl_getinfo($c);

I'm not sure if this $info variable is used later on

@heisenbol
Copy link

and, yes, purl would save my day, too!

@azayarni
Copy link
Owner

just added basic curl_getinfo() support

@azayarni azayarni self-assigned this Apr 15, 2014
@heisenbol
Copy link

thanks for adding the getinfo support. Unfortunately I get now other errors with my twitter oauth authentication using opauth, which I suspect are due to some deeper differences in how curl works. I'll see if I can make this work

@kr4ft3r
Copy link

kr4ft3r commented Jun 10, 2014

At first I couldn't get purl to work with OpenGraph library on GAE, it turned out getinfo warning and errors that followed were generated from Google/IO/Curl.php file, called by Client.php because it was setup to use curl rather than stream, line 104 of Client.php:
if ($config->getIoClass() == Google_Config::USE_AUTO_IO_SELECTION) {
if (function_exists('curl_version') && function_exists('curl_exec')) {
$config->setIoClass("Google_IO_Curl");
} else {
$config->setIoClass("Google_IO_Stream");
}
When I set this up to always use $config->setIoClass("Google_IO_Stream") errors were gone and I could finally use opengraph library on GAE.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants