I have a bitcoind daemon running on a VPS server (ocean digital). Everything is set up ok and it is running with no issues!
I put this script in /var/www/html/test_call.php (in same folder with easybitoin.php) in the VPS (ocean digital):
Code:
<?php
require('easybitcoin.php');
$bitcoin = new Bitcoin('ausername', 'apassword', 'localhost');
$info = $bitcoin->getinfo();
print_r($info);
?>
and everything is OK as I receive something like : Array ( [version] => 140000 [protocolversion] => …
Now, my problem is when I put the script in the Godaddy Web server /public_html/test_call.php (in same folder with easybitoin.php) it gives me a blanc screen. I do that because I don't want my web site run in the same server with the VPS that runs bitcoind (i will add later a SSH tunnel between them). Here is the test_call.php file in GoDaddy:
Code:
<?php
require('easybitcoin.php');
$bitcoin = new Bitcoin('ausername', 'apassword', 'IP of VPS Ocean Digital');
$info = $bitcoin->getinfo();
print_r($info);
?>
And here is the bitcoin.conf:
Code:
rpcuser=ausername
rpcpassword=apassword
daemon=1
server=1
rpcallowip=the Website IP for GoDaddy
keypool=10000
prune=600
maxuploadtarget=20
maxconnections=16
I also tried opening ports 8332 and 8333 in the VPS (ocean digital) with
Code:
sudo ufw allow
I also changed the port in bitcoin config by adding the line
Code:
rpcport=570
Code:
$bitcoin = new Bitcoin('ausername', 'apassword', 'IP of VPS Ocean Digital', '570');
I searched a lot and found a lot of similar issues from other users, but I couldn’t find the solution.
It seems like am doing something wrong and the rpc is not working properly.
Any ideas please?
Thank you
Nick