guzzle / guzzle

Guzzle, an extensible PHP HTTP client

Home Page:https://docs.guzzlephp.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

<b>Fatal error</b>: Uncaught Error: Undefined constant &quot;GuzzleHttp\Handler\CURLOPT_CUSTOMREQUEST&quot; in /users/infinimonster/www/bankpipe/Omnipay/guzzlehttp/guzzle/src/Handler/CurlFactory.php:195

FuckingToasters opened this issue · comments

Guzzle version(s) affected: x.y.z
PHP version: x.y.z (hint: php --version)
cURL version: x.y.z (hint: php -i | grep cURL)
(I'm not allowed to run these commands on my hosting service within the free package (https://bplaced.net)

Description
Ths Problem happens, when using the bankpipe mybb plugin while clicking on the cinbase logo which should open a embed for the payment process. currently the error below appears as response to the api call.

How to reproduce

<br />
<b>Fatal error</b>:  Uncaught Error: Undefined constant &quot;GuzzleHttp\Handler\CURLOPT_CUSTOMREQUEST&quot; in /users/infinimonster/www/bankpipe/Omnipay/guzzlehttp/guzzle/src/Handler/CurlFactory.php:195
Stack trace:
#0 /users/infinimonster/www/bankpipe/Omnipay/guzzlehttp/guzzle/src/Handler/CurlFactory.php(41): GuzzleHttp\Handler\CurlFactory-&gt;getDefaultConf(Object(GuzzleHttp\Handler\EasyHandle))
#1 /users/infinimonster/www/bankpipe/Omnipay/guzzlehttp/guzzle/src/Handler/CurlHandler.php(39): GuzzleHttp\Handler\CurlFactory-&gt;create(Object(GuzzleHttp\Psr7\Request), Array)
#2 /users/infinimonster/www/bankpipe/Omnipay/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(66): GuzzleHttp\Handler\CurlHandler-&gt;__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#3 /users/infinimonster/www/bankpipe/Omnipay/guzzlehttp/guzzle/src/HandlerStack.php(67): GuzzleHttp\PrepareBodyMiddleware-&gt;__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#4 /users/infinimonster/www/bankpipe/Omnipay/guzzlehttp/guzzle/src/Client.php(277): GuzzleHttp\HandlerStack-&gt;__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#5 /users/infinimonster/www/bankpipe/Omnipay/guzzlehttp/guzzle/src/Client.php(98): GuzzleHttp\Client-&gt;transfer(Object(GuzzleHttp\Psr7\Request), Array)
#6 /users/infinimonster/www/bankpipe/Omnipay/php-http/guzzle6-adapter/src/Client.php(60): GuzzleHttp\Client-&gt;sendAsync(Object(GuzzleHttp\Psr7\Request))
#7 /users/infinimonster/www/bankpipe/Omnipay/php-http/guzzle6-adapter/src/Client.php(50): Http\Adapter\Guzzle6\Client-&gt;sendAsyncRequest(Object(GuzzleHttp\Psr7\Request))
#8 /users/infinimonster/www/bankpipe/Omnipay/omnipay/common/src/Common/Http/Client.php(67): Http\Adapter\Guzzle6\Client-&gt;sendRequest(Object(GuzzleHttp\Psr7\Request))
#9 /users/infinimonster/www/bankpipe/Omnipay/omnipay/common/src/Common/Http/Client.php(56): Omnipay\Common\Http\Client-&gt;sendRequest(Object(GuzzleHttp\Psr7\Request))
#10 /users/infinimonster/www/bankpipe/Omnipay/zek/omnipay-coinbase/src/Message/AbstractRequest.php(82): Omnipay\Common\Http\Client-&gt;request('POST', 'https://api.com...', Array, 'amount=500.00&amp;n...')
#11 /users/infinimonster/www/bankpipe/Omnipay/zek/omnipay-coinbase/src/Message/PurchaseRequest.php(63): Omnipay\Coinbase\Message\AbstractRequest-&gt;sendRequest('POST', '/charges', Array)
#12 /users/infinimonster/www/bankpipe/Omnipay/omnipay/common/src/Common/Message/AbstractRequest.php(734): Omnipay\Coinbase\Message\PurchaseRequest-&gt;sendData(Array)
#13 /users/infinimonster/www/bankpipe/Core.php(235): Omnipay\Common\Message\AbstractRequest-&gt;send()
#14 /users/infinimonster/www/bankpipe/Gateway/Coinbase.php(65): BankPipe\Core-&gt;purchase(Array, Array)
#15 /users/infinimonster/www/bankpipe.php(184): BankPipe\Gateway\Coinbase-&gt;purchase(Array, Array)
#16 {main}
  thrown in <b>/users/infinimonster/www/bankpipe/Omnipay/guzzlehttp/guzzle/src/Handler/CurlFactory.php</b> on line <b>195</b><br />

Possible Solution:
I think the issue is becasue curl is only avaible on bplaced pro & higher but i don't want to pay for it. Anyone know a hosting provider, which offer this for free? It might also be better for others which faste the same problem to setup a custom error message something like"your hosting provider don't allow curl or you havn't installed it"

The stack trace shows you are using Guzzle 6, which is EOL. We will fix this on Guzzle 7, only.

Fixed in 7.5.0.