troubleshooting Question

php curl issue with ssl

Avatar of amitnepal
amitnepalFlag for United States of America asked on
ProgrammingWeb Servers
27 Comments1 Solution2472 ViewsLast Modified:
Hello,
  I am running the following in two servers, one of them works fine, however on the other server I get an error :

"Peer Certificate cannot be authenticated with given CA certificates"

However, if I run the command :
curl -v 'https://www.google.com' 

 , it will work fine. I am only having problem when i call that through the following php script :

<?php

$c = curl_init('https://www.google.com);
$response = curl_exec($c);
if($response)
	echo  response;
else
	echo curl_error($c);
curl_close($c)

?>

Any Ideas ?

Thanks
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 27 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 27 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros