Comments (12)
Hi,
Thank you for reaching us. It seems like the certificate keychain used by
php curl is out of date or missing (and/or you do not have openSSL
installed). I suggest you to follow the steps from this guide (section 3 is
the most relevant) http://support.gnip.com/articles/curl-on-win7.html
Please let us know if you need more help with this issue.
Best,
Tommaso
On Wed, Apr 1, 2015 at 8:46 AM, Tommy Nguyen [email protected]
wrote:
Fatal error: Uncaught exception 'GuzzleHttp\Ring\Exception\RingException'
with message 'cURL error 60: SSL certificate problem: self signed
certificate in certificate chain' in
C:\workspace\app\vendor\guzzlehttp\ringphp\src\Client\CurlFactory.php:126
Stack trace: #0
C:\workspace\app\vendor\guzzlehttp\ringphp\src\Client\CurlFactory.php(90):
GuzzleHttp\Ring\Client\CurlFactory::createErrorResponse(Object(GuzzleHttp\Ring\Client\CurlHandler),
Array, Array) #1 #1
C:\workspace\app\vendor\guzzlehttp\ringphp\src\Client\CurlHandler.php(78):
GuzzleHttp\Ring\Client\CurlFactory::createResponse(Object(GuzzleHttp\Ring\Client\CurlHandler),
Array, Array, Array, Resource id #68) #2
#2
C:\workspace\app\vendor\guzzlehttp\ringph p\src\Client\Middleware.php(54):
GuzzleHttp\Ring\Client\CurlHandler->__invoke(Array) #3
#3
C:\workspace\app\vendor\guzzlehttp\ringphp\src\Client\Middleware.php(30):
GuzzleHttp\Ring\Client\Middleware::GuzzleHttp\Ring\Client{closure}(Array)
#4 #4
C:\workspace\app\vendor\guzzlehttp\guzzle\src\RequestFsm.php(129):
GuzzleHttp\Ring\Cli in
C:\workspace\app\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php
on line 51I would appreciate if you could help me get around this error
—
Reply to this email directly or view it on GitHub
#15.
from stream-php.
I have followed your steps and also searched google for further help but to
no success.
Can you please help me, the api still dont work
2015-04-01 14:53 GMT+02:00 Tommaso Barbugli [email protected]:
Hi,
Thank you for reaching us. It seems like the certificate keychain used by
php curl is out of date or missing (and/or you do not have openSSL
installed). I suggest you to follow the steps from this guide (section 3 is
the most relevant) http://support.gnip.com/articles/curl-on-win7.htmlPlease let us know if you need more help with this issue.
Best,
TommasoOn Wed, Apr 1, 2015 at 8:46 AM, Tommy Nguyen [email protected]
wrote:Fatal error: Uncaught exception 'GuzzleHttp\Ring\Exception\RingException'
with message 'cURL error 60: SSL certificate problem: self signed
certificate in certificate chain' in
C:\workspace\app\vendor\guzzlehttp\ringphp\src\Client\CurlFactory.php:126
Stack trace: #0C:\workspace\app\vendor\guzzlehttp\ringphp\src\Client\CurlFactory.php(90):
GuzzleHttp\Ring\Client\CurlFactory::createErrorResponse(Object(GuzzleHttp\Ring\Client\CurlHandler),
Array, Array) #1 #1C:\workspace\app\vendor\guzzlehttp\ringphp\src\Client\CurlHandler.php(78):
GuzzleHttp\Ring\Client\CurlFactory::createResponse(Object(GuzzleHttp\Ring\Client\CurlHandler),
Array, Array, Array, Resource id #68) #2
#2
C:\workspace\app\vendor\guzzlehttp\ringph
p\src\Client\Middleware.php(54):
GuzzleHttp\Ring\Client\CurlHandler->__invoke(Array) #3
#3
C:\workspace\app\vendor\guzzlehttp\ringphp\src\Client\Middleware.php(30):
GuzzleHttp\Ring\Client\Middleware::GuzzleHttp\Ring\Client{closure}(Array)
#4 #4
C:\workspace\app\vendor\guzzlehttp\guzzle\src\RequestFsm.php(129):
GuzzleHttp\Ring\Cli inC:\workspace\app\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php
on line 51I would appreciate if you could help me get around this error
—
Reply to this email directly or view it on GitHub
#15.—
Reply to this email directly or view it on GitHub
#15 (comment).
from stream-php.
1, Download the Certficate Authority Bundle and save it somewhere locally.
2, Instantiate a feed object like so $user_feed = $client->feed('user', '1');
3, Add a default option to the Guzzle HTTP client for that feed like so $user_feed->setGuzzleDefaultOption('verify', '/absolute/path/to/cacert.pem');
This will have to be done for every feed you instantiate because as far as I am aware GetStream haven't provided us with a method to set a global option on the HTTP client or a method of passing our own in.
Full example:
// Instantiate a feed object
$user_feed = $client->feed('user', '1');
// You have to manually set the path to the cacert.pem. This must be absolute.
$user_feed->setGuzzleDefaultOption('verify', '/absolute/path/to/cacert.pem');
$feed->addActivity([
'actor' => 'User:2',
'verb' => 'review',
'object' => 'Review:'.$review->id,
]);
I hope this helps somebody.
from stream-php.
David's suggestion is correct. I am going to add support for options to be
defined at client level and add mention this specific use use case in the
readme.
On Tue, Apr 28, 2015 at 1:10 PM, David Hancock [email protected]
wrote:
1, Download the Certficate Authority Bundle
http://curl.haxx.se/ca/cacert.pem and save it somewhere locally.
2, Instantiate a feed object like so $user_feed = $client->feed('user',
'1');
3, Add a default option to the Guzzle HTTP client for that feed like so $user_feed->setGuzzleDefaultOption('verify',
'/absolute/path/to/cacert.pem'); This will have to be done for every feed
you instantiate because as far as I am aware GetStream haven't provided us
with a method to set a global option on the HTTP client or a method of
passing our own in.Full example:
// Instantiate a feed object
$user_feed = $client->feed('user', '1');// You have to manually set the path to the cacert.pem. This must be absolute.
$user_feed->setGuzzleDefaultOption('verify', '/absolute/path/to/cacert.pem');$feed->addActivity([
'actor' => '\Inviite\Model\User:2',
'verb' => 'review',
'object' => 'Review:'.$review->id,
]);I hope this helps somebody.
—
Reply to this email directly or view it on GitHub
#15 (comment).
from stream-php.
hi, no @davgothic it's not solve my problem. thanks.
on guzzle 5, there was no problem with it.
from stream-php.
@MasterB can you elaborate a bit more?
from stream-php.
@tbarbugli I've updated Guzzle from 5 to 6. Now its not possible to connect to my https - API, which has a Sneakoil certificate installed. I use PHP 5.5.x. Maybe there is a config problem with the server.
I've tried some things without success. Simple 'verify' => false no longer works for me.
http://docs.guzzlephp.org/en/latest/request-options.html#verify-option
I'm not an SSL certifacte expert.
from stream-php.
I've seen on the class GetStream\Stream\Feed that a new GuzzleHttp\Psr7\Request is made, and it has $this->guzzleOptions as fifth parameter.
Watching to the class GuzzleHttp\Psr7\Request I see that the constructor don't expects to receive that parameter there. And I think that because of that the method setGuzzleDefaultOption do nothing.
from stream-php.
@sabrinapisol You're right! I created this PR #45 which should fix that! It's probably a remainder of upgrading from Guzzle v4-5 to Guzzle v6.
I would be happy if you could take a look at that PR and tell me if you spot any mistakes.
from stream-php.
@MasterB also for you, #45 should fix that. Could you let me know if it works if you install it using
composer require get-stream/stream:"dev-fix/guzzle-request-options"
(please don't commit that, but only run it locally)
and then execute the usual
$feed->setGuzzleDefaultOption('verify', '/absolute/path/to/cacert.pem');
// or:
$feed->setGuzzleDefaultOption(GuzzleHttp\RequestOptions::VERIFY, '/absolute/path/to/cacert.pem');
// see: http://docs.guzzlephp.org/en/stable/request-options.html#verify
Thanks!
from stream-php.
@sabrinapisol @MasterB Replaced #45 with #49.
from stream-php.
Fixed in 2.4.1
from stream-php.
Related Issues (20)
- Time Parameter For Batch Methods HOT 2
- Missing GetStream\Stream\Feed::delete() function HOT 2
- Attempted to call function "parse_query" HOT 4
- is 2.1.0 still maintained? HOT 1
- JWT Version Again HOT 1
- Guzzle 6.0 Issue HOT 4
- version in client.php is wrong HOT 1
- 'Invalid Json Payload' error on updateActivities() HOT 6
- GetStream\Stream\Signer.php:88 type "string" in php-5.6 doesn't work HOT 1
- Call to undefined method GetStream\Stream\Feed::followFeed()
- Batch upsert collection fails with "error parsing 'data'" HOT 3
- Feed slug validation is not consistent with GetStream docs HOT 1
- Can't log request/response to file HOT 1
- Batcher unfollowMany results in 429 Too Many Requests HOT 1
- Add interfaces for the Feed and the Client HOT 1
- Replace abandoned packages HOT 3
- Support enrichment for client->getActivties
- Add child reaction fail with {"detail":"Error parsing 'target_feeds'","status_code":400,"code":4,"exception":"InputException","exception_fields":{"ta (truncated...) HOT 2
- How to enrich reactions HOT 1
- Use of undefined constant VERSION HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stream-php.