最近、サーバーを php5 に変更しました。以下のコードは古いサーバー (php 4) では正常に動作していましたが、新しいサーバー (php5) では動作しなくなりました。エラーメッセージは表示されません。
ini_set('display_errors', true);
ini_set('error_reporting', E_ALL);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url); // set url to post to
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable
curl_setopt($ch, CURLOPT_TIMEOUT, 10); // times out after 10s
curl_setopt($ch, CURLOPT_POST, 1); // set POST method
curl_setopt($ch, CURLOPT_POSTFIELDS, "category=".$heading."&county=".$county."&sorttype=1"); // add POST fields
$myHeader = array("Content-Type: application/x-www-form-urlencoded", "Accept-Charset: utf-8");
curl_setopt($ch, CURLOPT_HTTPHEADER, $myHeader);
$result = curl_exec($ch); // run the whole process
curl_close($ch);
php4 と php5 の間で気をつけなければならないことがあれば助けてください