将php curl与客户端Certifcate一起使用时出现分段错误

将php curl与客户端Certifcate一起使用时出现分段错误,php,curl,ssl,client,Php,Curl,Ssl,Client,我正在做一个php应用程序,它应该连接到一个RESTful Web服务,这需要一个客户端证书 但是,当将php curl与客户端Certifcate一起使用时,我遇到了一个分段错误 密钥和证书文件是正确的。我在RHEL6上使用PHP5.3.3 有人帮忙吗 <?php $url = 'https://10xxxxxxxxxxxxxxxxxx'; $data = array(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx);

我正在做一个php应用程序,它应该连接到一个RESTful Web服务,这需要一个客户端证书

但是,当将php curl与客户端Certifcate一起使用时,我遇到了一个分段错误

密钥和证书文件是正确的。我在RHEL6上使用PHP5.3.3

有人帮忙吗

<?php

$url = 'https://10xxxxxxxxxxxxxxxxxx';


$data = array(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx);                                                                    
$data_string = json_encode($data);    

echo($data_string);  
error_reporting(E_ALL);                                                                             

$ch = curl_init($url); 

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");   
curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
    'Content-Type: application/json',  
    'Accept: application/json',          
    'User-Agent: Apache CXF 2.6.1', 
    'Cache-Control: no-cache', 
    'Pragma: no-cache',    
    'Connection: keep-alive',                                                                 
    'Content-Length: ' . strlen($data_string))                                                                       
);                                                                                                                   

curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);                                                                  
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);   
curl_setopt($ch, CURLOPT_VERBOSE, true); 


curl_setopt($ch, CURLOPT_SSLKEY, '/fullpath/b.key'); 
curl_setopt($ch, CURLOPT_SSLCERT, '/fullpath/c.crt'); 




$result = curl_exec($ch);

echo(htmlentities($result));


?>

更新您的curl库:)(和PHP,但如果我没记错的话,这是curl问题,而不是PHP)这取决于yum或者up2date。我有7.19.7-26版