Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verbose mode for guzzlehttp requests #47

Closed
jlstack opened this issue Apr 7, 2016 · 2 comments
Closed

Verbose mode for guzzlehttp requests #47

jlstack opened this issue Apr 7, 2016 · 2 comments

Comments

@jlstack
Copy link

jlstack commented Apr 7, 2016

In our application we are currently getting "cURL error 1: Protocol %7Bhttps not supported or disabled in libcurl." We are having a difficult time debugging this issue as we know that https is supported in our environment. We saw that guzzlehttp has a 'debug' argument but could not find a way to use this feature with the current SDK. Is this already supported or are there any intentions of supporting it in the future?

@haphan
Copy link
Collaborator

haphan commented Apr 11, 2016

@jlstack Debugging is supported but not well documented.

Following snippet will give you a good start. The most important part is you need to enable debug by setting debugLog to true and also inject logger and messageFormatter

use GuzzleHttp\MessageFormatter;
use Monolog\Logger;

$logger = new Logger('console');
$messageFormatter = new MessageFormatter(MessageFormatter::DEBUG);

$params = [
    'authUrl'          => 'http://1.2.3.4:5000/v3',
    'region'           => 'REGION',
    'user'             => [],
    'debugLog'         => true,
    'logger'           => $logger,
    'messageFormatter' => $messageFormatter,
];
$openstack = new OpenStack\OpenStack($params);

However, your issue sounds more like curl-ext settings than the SDK itself. Can you check if https protocol is enabled? (See protocols under cURL in phpinfo)

Or check php-cli via command line

$ php -i | grep Protocols
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, smb, smbs, smtp, smtps, telnet, tftp

@haphan
Copy link
Collaborator

haphan commented Apr 27, 2016

@jamiehannaford I guess this issue is more of a question. Can you close?

@jlstack jlstack closed this as completed Apr 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants