Need help in CURL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eshban
Forum Contributor
Posts: 184
Joined: Mon Sep 05, 2005 1:38 am

Need help in CURL

Post by eshban »

Hello,

I am working on CURL Library. I have HTTPS installed on my domain. But i got the folowing error when i run my CURL CODE

Code: Select all

CURL ERROR: error:14094418:SSL routines:func(148):reason(1048)
Plz suggest that how to fix this error.

Here is my complete code

i check that i got all values in varaibles passed as a parameter.

Code: Select all

function SendSoapToPayPal($url, $sslcertpath, $soapData) {
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_SSLCERT, $sslcertpath);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $soapData);
	$temp = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	$returnedData = curl_exec ($ch);
    $error = curl_error( $ch );
    if( !empty( $error )) {
      $html = "CURL ERROR: " .$error."<br>";
	  echo $html;
 	  curl_close ($ch);
      return $returnedData;
    }
	curl_close ($ch);
	return $returnedData;
}
Plz help

Regards,
Eshban
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Does this help ?
If you get this error. . .
SSL: error:14094418:SSL routines:func(148):reason(1048)
Then the problem is having PayPal Direct in demo mode, but a non-demo mode certificate and vice-versa.
Post Reply