Hi guys,
I spent the last 6 weeks trying to get authorize.net (written in PHP) to work on Windows 2003 Server but didn't have any luck. This authorize.net test file runs great on my Linux box. However, it just refuses to work on my Windows 2003 Server.
On my Win2003 box, I verified that php (4.3.4) is properly installed and configured in addtion to cURL (7.10.5) and OpenSSL (0.9.7c) (Zlib 1.1.4). And all of these settings are refelected in my phpinfo link. http://www.piaawarehouse.com/phpinfo.php (the php_curl extension is enabled in the php.ini file)
Just to make sure that cURL is working correctly, I tested it out using this sample codes and it works great. Here is a link to that file on my Windows 2003 server. http://www.piaawarehouse.com/test3.php
<?php
// FIND BOOKS ON PHP AND MYSQL ON AMAZON
$url = "http://www.amazon.com/exec/obidos/search-handle-form/002-5640957-2809605";
$ch = curl_init(); // initialize curl handle
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, 3); // times out after 4s
curl_setopt($ch, CURLOPT_POST, 1); // set POST method
curl_setopt($ch, CURLOPT_POSTFIELDS, "url=index%3Dbooks&field-keywords=PHP+MYSQL"); // add POST fields
$result = curl_exec($ch); // run the whole process
curl_close($ch);
echo $result;
?>
Now moving to the authorize.net php file. Below is the php codes in that authorize.net test file that their technical support person sent me. What it does is 1) Post a HTTP request to the secure Authorize.net server. 2) Process the feedback received from that server. 3) Display the result.
Here is a link to that file on my Linux box. As you can see, it has no problem running it. All the variables are returned and shown as expected. http://www.tlelectronics.com/test.php
However, here is that exact same test file running on a Windows 2003 Server. It did not return any variables or error codes. 🙁 🙁 http://www.piaawarehouse.com/test.php
First I thought it was an issue security on IIS6 so I installed Apache2 on my Win2003 box. But it made no difference. Still no return variables/codes.
Any ideas/suggestions would be greatly appreciated.
Thanks
-Tuan