You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Language, language version, and OS: PHP, 5.5 on Google App Engine Standard
Issue description
I'm deploying an app to Google App Engine standard environment, PHP 5.5, but I'm encountering the following issue when making any request through the Braintree PHP library:
PHP Fatal error: Uncaught exception 'google\appengine\runtime\CurlLiteOptionNotSupportedException' with message 'Option 10065 is not supported by this curl implementation.' in /base/php_experiment_runtime/sdk/google/appengine/runtime/CurlLite.php:487
Stack trace:
#0 /base/php_experiment_runtime/sdk/google/appengine/runtime/CurlLite.php(215): google\appengine\runtime\CurlLite->setOption(10065, '/base/data/home...')
#1 /base/php_experiment_runtime/sdk/google/appengine/runtime/CurlLiteStub.php(1325): google\appengine\runtime\CurlLite->setOptionsArray(Array)
#2 /base/php_experiment_runtime/sdk/google/appengine/runtime/CurlLiteStub.php(1319): curl_setopt_array(Object(google\appengine\runtime\CurlLite), Array)
#3 /base/data/home/apps/s~enoronbackend/20170630t135950.402337515471573447/vendor/braintree/braintree_php/lib/Braintree/Http.php(135): curl_setopt(Object(google\appengine\runtime\CurlLite), 10065, '/base/data/home...')
#4 /base/data/home/apps/s~enoronbackend/20170630t135950.402337515471573447/vendor/braintree/braintree_php/li in /base/php_experiment_runtime/sdk/google/appengine/runtime/CurlLite.php on line 487
I did set up the library specifying no gzip responses, as indicated here.
The cUrl lite implementation provided by GAE does not support CURLOPT_CAINFO. I did try to use CURLOPT_CAPATH instead, as suggested in the PHP documentation on [cUrl][2], but then I got an Authorization error from Braintree.
Also commenting out the line where CURLOPT_CAINFO is results in an Authorization error.
Turns out that we need to use the full cUrl library (requires billing being enabled on GAE).
I suggest that in the readme of the library it is specified that, on GAE, in the php.ini file the following line must be included extension = "curl.so".
It would also be worth mentioning in the readme of the library that the following line won't work: google_app_engine.enable_curl_lite = “1”, even if commenting out the line CURLOPT_CAINFO in Braintree\Http.
General information
"braintree/braintree_php": "3.23.1"
Production
Issue description
I'm deploying an app to Google App Engine
standard
environment,PHP 5.5
, but I'm encountering the following issue when making any request through the Braintree PHP library:I did set up the library specifying no gzip responses, as indicated here.
It appears however that the problem is caused by line 133 in Braintree\Http:
The cUrl lite implementation provided by GAE does not support
CURLOPT_CAINFO
. I did try to useCURLOPT_CAPATH
instead, as suggested in the PHP documentation on [cUrl][2], but then I got an Authorization error from Braintree.Also commenting out the line where
CURLOPT_CAINFO
is results in an Authorization error.I've also submitted a question on Stackoverflow.
The text was updated successfully, but these errors were encountered: