Bitcoin Forum
December 06, 2016, 10:27:13 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: JSON & PHP Error [resolved]  (Read 3247 times)
joeyjoe
Full Member
***
Offline Offline

Activity: 224


View Profile
August 22, 2011, 08:43:42 PM
 #1

Hi,

Im just trying to setup PHP to communicate with my daemon. I have the server running on my pc with the PHP on my webhost. I have managed to get the server running and have checked the ports are forwarding which they are.

but i am getting this error message:

Quote
Fatal error: Uncaught exception 'Exception' with message 'Incorrect response id (request id: 1, response id: )' in /home/joeyjoec/public_html/bitcoinpaypal/jsonRPCClient.php:152 Stack trace: #0 [internal function]: jsonRPCClient->__call('getinfo', Array) #1 /home/joeyjoec/public_html/bitcoinpaypal/index.php(Cool: jsonRPCClient->getinfo() #2 {main} thrown in /home/joeyjoec/public_html/bitcoinpaypal/jsonRPCClient.php on line 152

my index.php is:

Quote
<?php
require_once('jsonRPCClient.php');
$bitcoin = new jsonRPCClient('http://user:password@86.21.243.231:8333/');

//Same as bitcoind.exe getinfo
print_r($bitcoin->getinfo());
?>


also tried port 8334 as they are both being used by the daemon.

I have also been unable to use the daemon from my local pc, getting error:

Quote
C:\Users\Joe>C:\Users\Joe\Desktop\bitcoin-0.3.24\daemon\bitcoind.exe getinfo
error: couldn't connect to server

any help would be great thanks


Bitcoin PHP programmer for hire! (HTML / CSS / JQuery / AJAX / .NET).
1481020033
Hero Member
*
Offline Offline

Posts: 1481020033

View Profile Personal Message (Offline)

Ignore
1481020033
Reply with quote  #2

1481020033
Report to moderator
1481020033
Hero Member
*
Offline Offline

Posts: 1481020033

View Profile Personal Message (Offline)

Ignore
1481020033
Reply with quote  #2

1481020033
Report to moderator
1481020033
Hero Member
*
Offline Offline

Posts: 1481020033

View Profile Personal Message (Offline)

Ignore
1481020033
Reply with quote  #2

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

Posts: 1481020033

View Profile Personal Message (Offline)

Ignore
1481020033
Reply with quote  #2

1481020033
Report to moderator
1481020033
Hero Member
*
Offline Offline

Posts: 1481020033

View Profile Personal Message (Offline)

Ignore
1481020033
Reply with quote  #2

1481020033
Report to moderator
bytedisorder
Hero Member
*****
Offline Offline

Activity: 489



View Profile WWW
August 28, 2012, 11:51:34 PM
 #2

How was this resolved, because I'm having the same issue.
gweedo
Legendary
*
Offline Offline

Activity: 1246


Java, PHP, HTML/CSS Programmer for Hire!


View Profile WWW
August 29, 2012, 12:08:07 AM
 #3

How was this resolved, because I'm having the same issue.

he probably added "allowip=<ip of request>" to bitcoin.conf since the bitcoind only allows localhost request without the allowip  variable

Want to earn 2500 SATOSHIS per hour? Come Chat and Chill in https://goseemybits.com/lobby
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!