PHP 5.3.6 - curl_exec挂起

I am having a odd problem with the php code below. I have noticed the issue is randomly happened in PHP 5.3.6. It works every times when I run it in PHP 5.2.5. Unfortunately we can downgrade the php due to other OCIs issues with 5.2.5, so we have to use 5.3.6. When the issue is occurred, I don't get any response back at all and it happens randomly. Please help, I need to get this project done asap. Thanks.

<?php
$url = 'https://www.PayEverywhere.com/api/vtapi.aspx?profile_id=XXXXXXXX&profile_key=XXXXXXXXXXXXX&transaction_type=S&card_number=...';  
$ch = curl_init($url);
curl_setopt($ch,CURLOPT_FRESH_CONNECT,TRUE);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,FALSE);
curl_setopt($ch,CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, TRUE);  
if ( ! $response = curl_exec($ch) )
{
    echo "Error " . curl_error($ch). "
";
}
echo $response;        
curl_close ($ch);
?> 

After having retrieved the following archives

http://curl.haxx.se/download.html

http://www.openssl.org/source/

http://web.mit.edu/kerberos/dist/index.html

# Install Curl
./configure --prefix=/curl/prefix --with-ssl=/ssl/prefix --disable-ipv6

# As curl depends on OpenSSL, install OpenSSL
./configure --prefix=/openssl/prefix

# As OpenSSL depends on Kerberos, install Kerberos
./configure --prefix=/kerberos/prefix