Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Abdizriel on December 16, 2013, 10:31:37 AM



Title: Troubles with jsonRPCClient
Post by: Abdizriel on December 16, 2013, 10:31:37 AM
Have some1 the same problem:

Code:
Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to http://nick:password@domain:22555/' in /var/www/jsonRPCClient.php:139
Stack trace:
#0 /var/www/index.php(7): jsonRPCClient->__call('getinfo', Array)
#1 /var/www/index.php(7): jsonRPCClient->getinfo()
#2 {main}
thrown in /var/www/jsonRPCClient.php on line 139

I've this code
Code:
<?php
require_once 'jsonRPCClient.php';

&
#38;#12288;$dogecoin = new jsonRPCClient('nick:password@domain:22555');
try{
&
#38;#12288;echo "<pre>\n";
&#38;#12288;print_r($dogecoin->getinfo());
&#38;#12288;echo "</pre>";
} catch(Exception $e){
&
#38;#12288;echo nl2br($e->getMessage()).'<br />'."\n"; }
?>


With Exception I've got this error

Code:
Parse error: syntax error, unexpected '$dogecoin' (T_VARIABLE) in /var/www/index.php on line 9


Title: Re: Troubles with jsonRPCClient
Post by: Qbeczeq on December 16, 2013, 04:46:32 PM
Can you show the index.php code? Or this is index?

Code:
<?php
require_once 'jsonRPCClient.php';

&
#38;#38;#12288;$dogecoin = new jsonRPCClient('nick:password@domain:22555');
try{
&
#38;#38;#12288;echo "<pre>\n";
&#38;#38;#12288;print_r($dogecoin->getinfo());
&#38;#38;#12288;echo "</pre>";
} catch(Exception $e){
&
#38;#38;#12288;echo nl2br($e->getMessage()).'<br />'."\n"; }
?>


Title: Re: Troubles with jsonRPCClient
Post by: Abdizriel on December 16, 2013, 06:09:26 PM
This is index.php file.

Code:
<?php
require_once 'jsonRPCClient.php';

$dogecoin = new jsonRPCClient('nick:password@domain:22555');
try{
  echo 
"<pre>\n";
  
print_r($dogecoin->getinfo());
  echo 
"</pre>";
} catch(
Exception $e){
  echo 
nl2br($e->getMessage()).'<br />'."\n"; }
?>


Title: Re: Troubles with jsonRPCClient
Post by: myrez on December 17, 2013, 02:07:44 PM
This is index.php file.

Code:
<?php
require_once 'jsonRPCClient.php';

$dogecoin = new jsonRPCClient('nick:password@domain:22555');
try{
  echo 
"<pre>\n";
  
print_r($dogecoin->getinfo());
  echo 
"</pre>";
} catch(
Exception $e){
  echo 
nl2br($e->getMessage()).'<br />'."\n"; }
?>

what domain your using? and about port 22555? have you changed it in bitcoin daemon to match it?


Title: Re: Troubles with jsonRPCClient
Post by: bitpop on December 24, 2013, 07:38:27 AM
You have a problem in the include