Re: PHP 4.3.1 and Curl

From: Date: Tue, 18 Mar 2003 19:39:48 +0000
Subject: Re: PHP 4.3.1 and Curl
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-19052@lists.php.net to get a copy of this message
Well after after banging my head a little bit the answer fell out. With the newer versions of curl, it seems that you have to use the ca-bundle.crt file for curl to be able to verify certificates. I had to put the following statement into my scripts. curl_setopt($ch, CURLOPT_CAINFO, 'drive:\pathto\ca-bundle.crt'); Still have to modify all my scripts that are using curl, but I feel that it is better than setting it to not verify. Robert "Robert Smith" <robert@asc1net.net> wrote in message news:20030317213951.70265.qmail@pb1.pair.com... > More information on below. I added the Curl_Verbose statement to my test > script and this is what it displayed. > > SSL: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate > verify failed* Closing connection #0 > > > "Robert Smith" <robert@asc1net.net> wrote in message > news:20030317161316.81072.qmail@pb1.pair.com... > > Windows 2000 > > IIS 5 > > > > I recently upgraded to php 4.3.1 from 4.2. Curl was working before the > > upgrade. I do have the curl extension uncommented in php.ini. php_info > says > > that curl is enabled. I wrote a simple script to test curl. > > > > <? > > print("Hello World"); > > error_reporting(E_ALL); > > $ch = curl_init(); > > curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); > > curl_setopt($ch, CURLOPT_URL "any https site"); > > $response curl_exec ($ch); > > curl_close($ch); > > print($response); > > print("GoodBye"); > > ?> > > > > I do not get any errors when I run the script. Simply a blank page with > my > > print statement. I put the print statements in to make sure the script > was > > running all the way through. It will display any page that is not https. > I > > can also insert CURLOPT_SSL_VERIFYPEER, 0 and it will pull up https site. > I > > am tring to avoid having to use this statement because it would take some > > time to go back and add this to all our shopping carts that are using > curl. > > > > Thanks for any input > > > > Robert Smith > > > > > >

« previous php.windows (#19052) next »