What does Error: TCP connection reset by peer - PHP/CURL/HTTPS issues

I am stuck here:

I get this Error: TCP connection reset by peer.

This is my CURL Script

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url_webpay);

//curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

//curl_setopt($ch, CURLOPT_TIMEOUT, 60);

//curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

//curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

//curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

//curl_setopt($ch, CURLOPT_SSLVERSION, 6);

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

curl_setopt($ch, CURLOPT_POST, false );

Without the comments, I get the error message.

Just leaving those options readable in the code above displays the page without the error but does not give me access to the $header.

I have done this:

curl_setopt($ch, CURLOPT_CAINFO, "/abc/ssl/certs/abc.crt");

I get a different error.

Can someone guide me on what am missing? I am using php 5.4.16 on CentOS 7.

I want to get all the CURL options working, cos I need to get feedback from the headers.