Problem submitting calls via jsonrpcphp client

Post Reply
nimanator
Posts: 12
Joined: Sat Mar 29, 2014 7:01 pm
os: mac
Contact:

Problem submitting calls via jsonrpcphp client

Post by nimanator » Sat Mar 29, 2014 7:37 pm

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?
Bit.co.in - The cryptocurrency address shortener
CoinJabber.com - Crypto business ratings and reviews

domob
Posts: 1123
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Problem submitting calls via jsonrpcphp client

Post by domob » Mon Mar 31, 2014 5:22 am

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).
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

nimanator
Posts: 12
Joined: Sat Mar 29, 2014 7:01 pm
os: mac
Contact:

Re: Problem submitting calls via jsonrpcphp client

Post by nimanator » Mon Mar 31, 2014 7:15 am

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.
Bit.co.in - The cryptocurrency address shortener
CoinJabber.com - Crypto business ratings and reviews

Post Reply