Environment Variables

Guzzle exposes a few environment variables that can be used to customize the behavior of the library.

GUZZLE_CURL_SELECT_TIMEOUT

Controls the duration in seconds that a curl_multi_* handler will use when selecting on curl handles using curl_multi_select(). Some systems have issues with PHP’s implementation of curl_multi_select() where calling this function always results in waiting for the maximum duration of the timeout.

HTTP_PROXY

Defines the proxy to use when sending requests using the “http” protocol.

Note: because the HTTP_PROXY variable may contain arbitrary user input on some (CGI) environments, the variable is only used on the CLI SAPI. See https://httpoxy.org for more information.

HTTPS_PROXY

Defines the proxy to use when sending requests using the “https” protocol.

NO_PROXY

Defines URLs for which a proxy should not be used. See proxy for usage.

Relevant ini Settings

Guzzle can utilize PHP ini settings when configuring clients.

openssl.cafile

Specifies the path on disk to a CA file in PEM format to use when sending requests over “https”. See: https://wiki.php.net/rfc/tls-peer-verification#phpini_defaults