Author

Topic: jsonrpc [solved] (Read 1152 times)

hero member
Activity: 588
Merit: 500
★Bitvest.io★ Play Plinko or Invest!
August 16, 2014, 12:53:53 PM
#11
I figured it out. I was using an altcoind client but i was binding to the bitcoin port. Thank you for your assistance. This issue is solved.
kjj
legendary
Activity: 1302
Merit: 1025
August 16, 2014, 12:28:21 PM
#10
server=1
hero member
Activity: 588
Merit: 500
★Bitvest.io★ Play Plinko or Invest!
August 16, 2014, 12:14:11 PM
#9
bitcoin config: rpcallowip


I get:

Quote
EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_op tions14invalid_syntaxEEEEE      
unrecognized line in 'rpcallowip'      

I tried.
Quote
rpcallowip=true
I get no errors from bitcoind.

Unfortunately the error is persists. What else should I try?
sr. member
Activity: 426
Merit: 250
August 16, 2014, 05:34:19 AM
#8
bitcoin config: rpcallowip
hero member
Activity: 588
Merit: 500
★Bitvest.io★ Play Plinko or Invest!
August 16, 2014, 03:28:11 AM
#7
If you can telnet into port 8332 (proving a firewall isn't blocking it) and you've already double checked your .conf for errors then I'm coming up blank.

when I run
Quote
sudo telnet localhost 8332

I get.

Quote
Trying ::1...
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

What do i do now?
legendary
Activity: 994
Merit: 1000
August 16, 2014, 03:11:04 AM
#6
If you can telnet into port 8332 (proving a firewall isn't blocking it) and you've already double checked your .conf for errors then I'm coming up blank.
hero member
Activity: 588
Merit: 500
★Bitvest.io★ Play Plinko or Invest!
August 16, 2014, 03:04:12 AM
#5
Shot in the dark, but might the connection be being blocked by firewall software on your PC?

edit... It's been forever for me, but I think you need to specify your bitcoind user and pass in a text file somewhere.

found it... ~/.bitcoin/bitcoin.conf

i already set rpcuser and rpcpassword in the .conf
legendary
Activity: 994
Merit: 1000
August 16, 2014, 02:44:19 AM
#4
Shot in the dark, but might the connection be being blocked by firewall software on your PC?

edit... It's been forever for me, but I think you need to specify your bitcoind user and pass in a text file somewhere.

found it... ~/.bitcoin/bitcoin.conf
hero member
Activity: 588
Merit: 500
★Bitvest.io★ Play Plinko or Invest!
August 16, 2014, 02:20:34 AM
#3
yes. I can run  

Quote
$ ./bitcoind getinfo

in the command line

it just doesnt work inside of a php script
legendary
Activity: 994
Merit: 1000
August 16, 2014, 02:06:43 AM
#2
Are you sure bitcoind is fully installed and running?

https://en.bitcoin.it/wiki/PHP_developer_intro
hero member
Activity: 588
Merit: 500
★Bitvest.io★ Play Plinko or Invest!
August 16, 2014, 02:00:27 AM
#1
i tried running the basic getinfo script
Quote
  require_once 'jsonRPCClient.php';
 
  $bitcoin = new jsonRPCClient('http://user:[email protected]:8332/');
 
  echo "
\n";
  print_r($bitcoin->getinfo());
  echo "
";
?>

I get error:

Quote
PHP Warning:  fopen(http://[email protected]:8332/): failed to open stream: Connection refused in .../jsonRPCClient.php on line 132
PHP Fatal error:  Uncaught exception 'Exception' with message 'Unable to connect to http://user:[email protected]:8332/' in .../jsonRPCClient.php:140
Stack trace:
#0 ...bitcoingetinfo.php(9): jsonRPCClient->__call('getinfo', Array)
#1 .../getinfo.php(9): jsonRPCClient->getinfo()
#2 {main}
  thrown in .../jsonRPCClient.php on line 140

What am I doing wrong?

*solved*
Jump to: