purl
purl copied to clipboard
curl_getinfo not (yet) supported
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.
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.
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
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.
Ok, it is easy. I'll implement it.
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.
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
and, yes, purl would save my day, too!
just added basic curl_getinfo() support
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
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.