Author

Topic: connection problems (Read 2719 times)

full member
Activity: 168
Merit: 100
Firstbits: 175wn
July 09, 2011, 12: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 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.
full member
Activity: 168
Merit: 100
Firstbits: 175wn
July 09, 2011, 11:03:09 AM
#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.
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
July 09, 2011, 12: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
full member
Activity: 168
Merit: 100
Firstbits: 175wn
July 08, 2011, 10:54:41 PM
#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?)
vip
Activity: 812
Merit: 1000
13
July 08, 2011, 07:23:15 PM
#1
connection problems
Jump to: