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

Curl certificate form Windows Server #9

Open
guillemcanal opened this issue Dec 26, 2012 · 0 comments
Open

Curl certificate form Windows Server #9

guillemcanal opened this issue Dec 26, 2012 · 0 comments

Comments

@guillemcanal
Copy link

In case Curl is used on Windows, it may be required to pass a certificate to the curl command like so :

In the set_request_options() method, found in the Curl class

// Add certificate for Windows
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
curl_setopt($this->request, CURLOPT_CAINFO, dirname(FILE) . DIRECTORY_SEPARATOR . 'Curl' . DIRECTORY_SEPARATOR . 'cacert.pem');
}

  1. You can obtain the certificate at http://curl.haxx.se/docs/caextract.html
  2. The piece of code above suggest creating a Curl/ folder at the component's root Directory

By the way, many thanks for this repo ;)

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

1 participant