title: PHP ignoring curl.cainfo setting in php.ini (apparently)
body: <p>I'm trying to fix a php_curl call on a Windows server (running IIS) that is returning the familiar error "SSL certificate problem, verify that the CA cert is OK. Details:
  error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed".</p>
  
  <p>As detailed in many related questions here, I downloaded <a href="http://curl.haxx.se/ca/cacert.pem" rel="noreferrer">http://curl.haxx.se/ca/cacert.pem</a>, moved it to my server's hard drive, and added the curl.cainfo setting to my php.ini:</p>
  
  <pre><code>curl.cainfo = "C:\path\to\cacert.pem"
  </code></pre>
  
  <p>Nothing, still getting the same error. However, specifying the path in the PHP code results in a successful response!</p>
  
  <pre><code>$ch = curl_init($url);
  curl_setopt($ch, CURLOPT_CAINFO, "C:\path\to\cacert.pem");
  $response = curl_exec($ch);
  </code></pre>
  
  <p>This does give me a workaround I can use for now, but I'm maintaining a large application with php_curl calls in many places, so it would be more logical to specify this setting once in php.ini so it applies to all php_curl calls in the application.</p>
  
  <p>Potential dumb mistake checking:</p>
  
  <ol>
  <li>I'm restarting IIS between php.ini edits</li>
  <li>I know I'm editing the right php.ini, because "echo ini_get('smtp_port');" reflects changes I make to that setting (changing a non-critical setting just for testing)</li>
  <li>I know IIS can read the file, because it works when setting it using curl_setopt() (above)</li>
  </ol>
  
  <p>Trying to look at the ini setting directly shows that PHP doesn't seem to know anything about it (am I doing this right?):</p>
  
  <pre><code>var_dump(ini_get('curl.cainfo'));
  
  ==&gt; bool(false)
  </code></pre>
  
  <p>Any ideas why PHP wouldn't read the curl.cainfo setting?</p>