Bitcoin Forum
May 12, 2024, 10:45:28 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Troubles with jsonRPCClient  (Read 1404 times)
Abdizriel (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
December 16, 2013, 10:31:37 AM
 #1

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
1715510728
Hero Member
*
Offline Offline

Posts: 1715510728

View Profile Personal Message (Offline)

Ignore
1715510728
Reply with quote  #2

1715510728
Report to moderator
1715510728
Hero Member
*
Offline Offline

Posts: 1715510728

View Profile Personal Message (Offline)

Ignore
1715510728
Reply with quote  #2

1715510728
Report to moderator
1715510728
Hero Member
*
Offline Offline

Posts: 1715510728

View Profile Personal Message (Offline)

Ignore
1715510728
Reply with quote  #2

1715510728
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715510728
Hero Member
*
Offline Offline

Posts: 1715510728

View Profile Personal Message (Offline)

Ignore
1715510728
Reply with quote  #2

1715510728
Report to moderator
1715510728
Hero Member
*
Offline Offline

Posts: 1715510728

View Profile Personal Message (Offline)

Ignore
1715510728
Reply with quote  #2

1715510728
Report to moderator
Qbeczeq
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
December 16, 2013, 04:46:32 PM
Last edit: December 17, 2013, 11:41:33 AM by Qbeczeq
 #2

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"; }
?>
Abdizriel (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
December 16, 2013, 06:09:26 PM
 #3

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"; }
?>
myrez
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
December 17, 2013, 02:07:44 PM
 #4

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?
bitpop
Legendary
*
Offline Offline

Activity: 2912
Merit: 1060



View Profile WWW
December 24, 2013, 07:38:27 AM
 #5

You have a problem in the include

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!