Bitcoin Forum
August 21, 2024, 08:21:23 PM *
News: All versions of Windows are affected by a critical security bug; make sure you update.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin json-RPC suddenly stopped working  (Read 1385 times)
johny1976 (OP)
Legendary
*
Offline Offline

Activity: 1135
Merit: 1002

Developer


View Profile
September 07, 2013, 01:07:11 AM
 #1

I have this PHP class for communicate with Litecoin client: https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

Class name is jsonRCPClient. In PHP $wallet = new jsonRPCClient('http://login:password@localhost:9332');

It worked. I changed nothing. It stopped work suddenly. I don't understand.

Can anybody explain me where could be a problem? Thank you...

I'm really crying now.
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1434



View Profile
September 07, 2013, 03:12:16 AM
 #2

Are you trying to get this to work with bitcoin, or litecoin daemon? The two have slightly different API because of updates. Also, it would be helpful if you could describe the error you are having.

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
johny1976 (OP)
Legendary
*
Offline Offline

Activity: 1135
Merit: 1002

Developer


View Profile
September 07, 2013, 05:31:05 AM
 #3

Are you trying to get this to work with bitcoin, or litecoin daemon? The two have slightly different API because of updates. Also, it would be helpful if you could describe the error you are having.

I'm trying to access Litecoin daemon.

if I call:
Code:
$wallet = new jsonRCPCClient('http://login:pass@localhost:9332');
echo $wallet->getbalance();

it works perfectly.

But I can't call:
Code:
$wallet = new jsonRCPCClient('http://login:pass@localhost:9332');
$txid = $wallet->sendtoaddress('LTCaddress');

It returns error:

PHP Fatal error:  Uncaught exception 'Exception' with message 'Unable to connect to http://username:password@localhost:9332' in /var/www/inc/jsonRPCClient.php
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1434



View Profile
September 07, 2013, 01:22:12 PM
 #4

Your call for sendtoaddress looks like it's missing a parameter. Are you sure you're calling it correctly?

Also I moved your topic because litecoin related discussions belong in alt-coins

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
johny1976 (OP)
Legendary
*
Offline Offline

Activity: 1135
Merit: 1002

Developer


View Profile
September 07, 2013, 05:55:11 PM
 #5

Your call for sendtoaddress looks like it's missing a parameter. Are you sure you're calling it correctly?

Also I moved your topic because litecoin related discussions belong in alt-coins

Yes, I'm calling it correctly. Sorry, I forgot to write it here. So my function is:

Code:
$txid=sendtoaddress('LTCaddress',0.5);

It just not working :/
coinotron
Legendary
*
Offline Offline

Activity: 1182
Merit: 1000


View Profile
September 07, 2013, 06:36:12 PM
 #6

How many concurrent RPC calls do you send to litecoin client?
I have serious issues with litecoin 0.8.3.7 not accepting more than 4 concurrent RPC. This bug is present also in bitcoin.

johny1976 (OP)
Legendary
*
Offline Offline

Activity: 1135
Merit: 1002

Developer


View Profile
September 07, 2013, 07:25:35 PM
 #7

How many concurrent RPC calls do you send to litecoin client?
I have serious issues with litecoin 0.8.3.7 not accepting more than 4 concurrent RPC. This bug is present also in bitcoin.

2. But it's working now, I just didn't have LTCs in wallet Cheesy Thanks
Petr1fied
Hero Member
*****
Offline Offline

Activity: 630
Merit: 502


View Profile
September 07, 2013, 08:18:27 PM
 #8

I find it's better to use getbalance(account, confirms) and sendfrom(account, address, value) as sendtoaddress doesn't specify a particular account and the accounts can potentially end up with negative balances.
johny1976 (OP)
Legendary
*
Offline Offline

Activity: 1135
Merit: 1002

Developer


View Profile
September 07, 2013, 08:23:10 PM
 #9

Thank you,

we alredy repaired the bug...

It is for project 10LTC.com, you can check that out guys ! Wink
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!