Bitcoin Forum
December 07, 2016, 04:34:21 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: connection problems  (Read 2537 times)
usagi
VIP
Hero Member
*
Offline Offline

Activity: 812


13


View Profile
July 09, 2011, 12:23:15 AM
 #1

connection problems
1481128461
Hero Member
*
Offline Offline

Posts: 1481128461

View Profile Personal Message (Offline)

Ignore
1481128461
Reply with quote  #2

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

Activity: 168

Firstbits: 175wn


View Profile
July 09, 2011, 03:54:41 AM
 #2

If you haven't already, you need to whitelist external addresses, for example:
Code:
rpcallowip=192.168.1.100
This whitelists the IP 192.168.1.100. Note that you're also allowed to use wildcard characters.

(If you've done this already, sorry - you weren't too clear in the OP. If this isn't helpful, you need to post more details - Which options, in specific have you tried in bitcoin.conf? Have you configured the PHP libraries right? Are you doing this between computers on the same network or across the internet?)

Donate: 175WNXmJ1WVhFgVGKUqEhYtAQGRYAvqPA
Xenland
Legendary
*
Offline Offline

Activity: 980


I'm not just any shaman, I'm a Sha256man


View Profile
July 09, 2011, 05:33:37 AM
 #3

If you haven't already, you need to whitelist external addresses, for example:
Code:
rpcallowip=192.168.1.100
This whitelists the IP 192.168.1.100. Note that you're also allowed to use wildcard characters.

(If you've done this already, sorry - you weren't too clear in the OP. If this isn't helpful, you need to post more details - Which options, in specific have you tried in bitcoin.conf? Have you configured the PHP libraries right? Are you doing this between computers on the same network or across the internet?)

Well, I've whitelisted the IPs in question, set server=1, everything else I can think of. But but but but but, what's this about PHP libraries? I uploaded phpRPCClient.php and Bitcoin.php and have been trying those.. Are you saying I actually have to install a system library too? Well, I didn't install any libraries. What do I need to do? "sudo apt-get php-json"?

Thanks for any advice.

-


this may sound wierd but I had the same problem I don't know exactly what fixed it becuase I double-triple-checked all the credentials but try commenting out server=1
It worked for me on top of 1000 other things I did, but really thats the only thing I could pin point it down too
drawoc
Full Member
***
Offline Offline

Activity: 168

Firstbits: 175wn


View Profile
July 09, 2011, 04:03:09 PM
 #4

Well, I've whitelisted the IPs in question, set server=1, everything else I can think of. But but but but but, what's this about PHP libraries? I uploaded phpRPCClient.php and Bitcoin.php and have been trying those.. Are you saying I actually have to install a system library too? Well, I didn't install any libraries. What do I need to do? "sudo apt-get php-json"?

No, I just meant to check that you're passing the right username, password, IP, and port to your JSON library.

You could try Xenland's suggestion, if you're running bitcoind, you don't need the sever flag (I have no idea why that might be a problem).

For reference, this is my full bitcoin.conf, and it lets me connect from other computers on the network:
Code:
rpcpassword=hi
rpcuser=hi
testnet=1
rpcallowip=192.168.1.*
(You don't want the testnet flag set.)

From the computer you're running the php on, you can try running:
Code:
telnet 192.168.1.2 8332
Replacing 192.168.1.2 with your IP, and 8332 with your port if you changed it.
If it gives you a connect error, your bitcoind is configured wrong, or you have the wrong port/ip address.
If it just sits there waiting for input, you're having a username/password issue.

Donate: 175WNXmJ1WVhFgVGKUqEhYtAQGRYAvqPA
drawoc
Full Member
***
Offline Offline

Activity: 168

Firstbits: 175wn


View Profile
July 09, 2011, 05:12:15 PM
 #5

The fact that it gives you "403 Forbidden" means that you can successfully connect to your bitcoind from that location. I would make sure that you're passing your username and password in your php file correctly.

If you need it, there's an example using the JSON-RPC PHP library here: https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29#PHP

The difference between doing telnet 127.0.0.1 and telnet <IP Address> is simply that when you connect remotely, it requires you to enter your username and password (The error is because you didn't, and you probably don't want to with telnet). The fact that the server is talking to you means it's configured properly, so the error is on the PHP end.

Donate: 175WNXmJ1WVhFgVGKUqEhYtAQGRYAvqPA
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!