Author

Topic: How to define datadir from PHP JSON RPC (Read 735 times)

hero member
Activity: 508
Merit: 500
Techwolf on #bitcoin and Reddit
April 25, 2014, 03:20:51 PM
#3
datadir must be set from command line at startup.

To clarify: you'll need two instances of bitcoind running on the server independently of your PHP script, each started with different "-datadir" arguments. You will need to bind one instance to a separate port as well in order to access them independently (without this, the second instance may fail to start).
legendary
Activity: 2058
Merit: 1431
April 25, 2014, 12:48:27 PM
#2
datadir must be set from command line at startup.
sr. member
Activity: 299
Merit: 256
April 25, 2014, 09:48:18 AM
#1
Hey everyone,

I want to know how to define datadir on bitcoind from PHP JSON RPC ?

Code:
bitcoind -datadir=$HOME/.bitcoin

I tried like this but no result:

Code:
$bitcoin = new jsonRPCClient('http://'.json_username.':'.json_password.'@'.json_server.':'.json_port.'/');
$bitcoin->datadir = "$HOME/.bitcoin";

But no result Sad

Please give me an idea about this, thank you so much.

TH GOAL IS TO USE TWO WALLETS IN THE SAME SERVER
Jump to: