The weird thing is I can easily do $bitcoin->validateaddress('biwoejfiwjefiwojeifow'); with no problem; it connects to the wallet and returns valid info.
Array
(
[isvalid] => 1
[address] => biwoejfiwjefiwojeifow
[ismine] =>
)
However just a couple of lines after that when I try to do the send it says it can't connect.
try {
$pay_out_address_details=$bitcoin->validateaddress($new_user['pay_out_address']);
echo '<pre>';
print_r($pay_out_address_details);
echo '</pre>';
}
catch (Exception $e) {
echo $e.'<br>';
die("<p>Server error! Please contact the admin.</p>");
}
It gets past that bit, but immediately after it is this, which it breaks on:
if ($pay_out_address_details['isvalid']==1) {
//add_to_log('Valid address... sending '.$new_user['pay_out_amount'].' BTC...');
$sendamt=number_format($new_user['pay_out_amount'],2,'.','');
if ($sendamt<=1000) {
try {
$bitcoin->sendfrom(PROGRAM_NAME,$new_user['pay_out_address'],$sendamt);
}
catch (Exception $e) {
echo $e.'<br>';
die("<p>Server error! Please contact the admin.</p>");
}
//add_to_log('...sent successfully.');
}
}
Note the add_to_log statements have been commented out.