I have found a host I like, but they have cURL installed as a local library and not compiled into PHP. I can't run anything on the command line. I have used the script examples out of this forum and other resources which are all the same script. Still nothing. Can it be that my hosting account is not allowing me to execute anything? I can run the curl command in ssh successfully. Any tips would be very appreciated.
my server has safe mode on and the safe_mode_exec_dir says /nonexec.
here is what I am using....
--- yes my path to curl is the same ---
$curl = "/usr/local/bin/curl";
$my_authnet_userid = "testdriver";
$total = "1.00";
$cc_number = "41111111111111";
$cc_exp = "1002";
$invoiceno = "12345";
$billing_address = "";
$billing_address = urlencode($billing_address);
$billing_zip = "";
exec("$curl -d 'x_Login=$my_authnet_userid&x_Amount=$total&x_Card_Num=$cc_number&x_Exp_Date=$cc_exp&x_ADC_URL=FALSE&x_ADC_Delim_Data=TRUE&x_Invoice_Num=$invoiceno&x_Version=3.0&x_Address=$billing_address&x_Zip=$billing_zip' https://secure.authorize.net/gateway/transact.dll", $authorize, $ret);
$auth_return = split("\,", $authorize[0]);
// for debugging you can print the variables returned:
for ($idx = 0; $idx < 39; ++$idx) {
$pos = $idx+1;
echo "Code".$pos.": ".$auth_return[$idx]."
";
}
if($auth_return[0] == 1){
// this section passes these three variables to your processing form
// for order tracking purposes
$auth_code = $auth_return[4];
$avs_code = $auth_return[5];
$trans_id = $auth_return[6];
} elseif($auth_return[0] == 2){
echo "Your order cannot be processed.
";
} elseif($auth_return[0] == 3){
echo "An error has occurred.
";
}
Roger