Bitcoin Forum
June 03, 2024, 08:19:33 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Can't connect to BTC server JSON  (Read 720 times)
IamAGentleman (OP)
Full Member
***
Offline Offline

Activity: 134
Merit: 100


View Profile
January 25, 2015, 02:01:38 AM
 #1

My conf file:

server=1
rpcuser=test
rpcpassword=test123
rpcport=8332
rpcallowip=*

My ports are forwarded and open to 8332. I have checked via a port checker. Using Bitcoin QT which is the latest version and downloaded all the blocks. I can connect to my json rpc via another machine on the internet. My wallet WAS working, but then all of a sudden it stopped working and now the error I get via my PHP file is:


Quote
Warning: fopen(http://...@removed:8332/): failed to open stream: Connection refused in /home3/public_html/application/libs/jsonRPCClient.php on line 132

Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to http://removed:removed@removed:8332/' in /home3/public_html/application/libs/jsonRPCClient.php:140 Stack trace: #0 /home3/public_html/application/controllers/test.php(11): jsonRPCClient->__call('getinfo', Array) #1 /home3/public_html/application/controllers/test.php(11): jsonRPCClient->getinfo() #2 /home3/public_html/application/core/application.php(46): Test->GenerateWallet() #3 /home3/public_html/public/index.php(28): Application->__construct() #4 {main} thrown in /home3/public_html/application/libs/jsonRPCClient.php on line 140


I'm sure it's working, I asked someone on reddit to visit my IP and the authentication box cam up so it can't be that. The code I am using it the rpcclient and connect like so:

Quote
require APP . 'libs/jsonRPCClient.php';
$btc = new jsonRPCClient("http://removed:removed@removed:8332/", true);
print_r($btc->getinfo());


Any help? Could it be my firewall, or server? Fopen and cURL are installed on my server. My server is https if that makes a difference, but I am connecting to my walled via http. My wallet is run on a local machine window 7... 24/7.
IamAGentleman (OP)
Full Member
***
Offline Offline

Activity: 134
Merit: 100


View Profile
January 25, 2015, 11:46:08 PM
 #2

Anyone?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!