我在下面的php代码中遇到了一个奇怪的问题。我注意到这个问题在PHP 5.3.6中随机发生。当我在PHP 5.2.5中运行它时,它每次都有效。不幸的是,由于5.2.5的其他OCI问题,我们可以降级php,所以我们必须使用5.3.6。当问题发生时,我根本没有得到任何回复,它随机发生。请帮助,我需要尽快完成这个项目。感谢。
<?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). "\n";
}
echo $response;
curl_close ($ch);
?>
答案 0 :(得分:0)
检索以下档案后
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