Page 1 of 1

Problem submitting calls via jsonrpcphp client

Posted: Sat Mar 29, 2014 7:37 pm
by nimanator
I have been using http://jsonrpcphp.org/code.php?file=jsonRPCClient to submit calls and receive responses from bitcoind without any problems.

So I'm now trying to do the same with namecoind.

I have a test environment setup on my Mac OSX 10.7.5 and I have Namecoin-QT running on there on port 8334.

I created a class Namecoin that extends jsonRPCClient (http://jsonrpcphp.org/code.php?file=jsonRPCClient)

Code: Select all

<?php
class Namecoin extends jsonRPCClient{

	public function __construct(){
		
		parent::__construct(Yii::app()->params['namecoinRpcUrl']);	

	}

}
?>
Then in my app for example I am trying this:

Code: Select all

if ($namecoin = new Namecoin()){
			$namecoinNamespace = 'bcit';
			$namecoinResponse = $namecoin->name_new($namecoinNamespace . '/' . 'testing123');
I notice the following error in the log:
PROCESSMESSAGE MESSAGESTART NOT FOUND
And then after 1 min:
socket no message in first 60 seconds, 1 0
disconnecting node 127.0.0.1:55982
It seems like the condition "if ($namecoin = new Namecoin())" succeeds, but then it doesn't like the $namecoin->name_new(...) part for some reason.

Any idea what I'm doing wrong?

Re: Problem submitting calls via jsonrpcphp client

Posted: Mon Mar 31, 2014 5:22 am
by domob
I've never used this class before, so not really ... but I've been able to use my own PHP class (included in the nameid.org sources) just fine. If it doesn't work out for you at all, you can try it (and I can help you setting it up).

Re: Problem submitting calls via jsonrpcphp client

Posted: Mon Mar 31, 2014 7:15 am
by nimanator
Thanks so much. I actually transitioned my test environment to a linux server and on there I'm not having this problem. This must have something to do with the way it was running on my mac. Appreciate the information, I'll check out your class either way.