Bitcoin Forum
April 25, 2024, 04:42:48 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to define datadir from PHP JSON RPC  (Read 715 times)
mombay (OP)
Sr. Member
****
Offline Offline

Activity: 299
Merit: 256



View Profile
April 25, 2014, 01:48:18 PM
 #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

           ▀██▄ ▄██▀
            ▐█████▌
           ▄███▀███▄
         ▄████▄  ▀███▄
       ▄███▀ ▀██▄  ▀███▄
     ▄███▀  ▄█████▄  ▀███▄
   ▄███▀  ▄███▀ ▀███▄  ▀███▄
  ███▀  ▄████▌   ▐████▄  ▀███
 ███   ██▀  ██▄ ▄██  ▀██   ███
███   ███  ███   ███  ███   ███
███   ███   ███████   ███   ███
 ███   ███▄▄       ▄▄███   ███
  ███▄   ▀▀█████████▀▀   ▄███
   ▀████▄▄           ▄▄████▀
      ▀▀███████████████▀▀
DeepOnion
███
███
███
███
███
███
███
███
███
███
   Anonymity Guaranteed
   Anonymous and Untraceable
   Guard Your Privacy
      ▄▄██████████▄▄
    ▄███▀▀      ▀▀█▀   ▄▄
   ███▀              ▄███
  ███              ▄███▀   ▄▄
 ███▌  ▄▄▄▄      ▄███▀   ▄███
▐███  ██████   ▄███▀   ▄███▀
███▌ ███  ███▄███▀   ▄███▀
███▌ ███   ████▀   ▄███▀
███▌  ███   █▀   ▄███▀  ███
▐███   ███     ▄███▀   ███
 ███▌   ███  ▄███▀     ███
  ███    ██████▀      ███
   ███▄             ▄███
    ▀███▄▄       ▄▄███▀
      ▀▀███████████▀▀
1714063368
Hero Member
*
Offline Offline

Posts: 1714063368

View Profile Personal Message (Offline)

Ignore
1714063368
Reply with quote  #2

1714063368
Report to moderator
1714063368
Hero Member
*
Offline Offline

Posts: 1714063368

View Profile Personal Message (Offline)

Ignore
1714063368
Reply with quote  #2

1714063368
Report to moderator
1714063368
Hero Member
*
Offline Offline

Posts: 1714063368

View Profile Personal Message (Offline)

Ignore
1714063368
Reply with quote  #2

1714063368
Report to moderator
The block chain is the main innovation of Bitcoin. It is the first distributed timestamping system.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714063368
Hero Member
*
Offline Offline

Posts: 1714063368

View Profile Personal Message (Offline)

Ignore
1714063368
Reply with quote  #2

1714063368
Report to moderator
1714063368
Hero Member
*
Offline Offline

Posts: 1714063368

View Profile Personal Message (Offline)

Ignore
1714063368
Reply with quote  #2

1714063368
Report to moderator
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
April 25, 2014, 04:48:27 PM
 #2

datadir must be set from command line at startup.

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
Dare
Hero Member
*****
Offline Offline

Activity: 508
Merit: 500


Techwolf on #bitcoin and Reddit


View Profile WWW
April 25, 2014, 07: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).

BTC: 1M8oUcBnkRDEhWWgV8ZXLTB6p1mgnejVbX
How Forum Activity Works
Bitcointalk Forum Rules
|
|
|
Firstbits (lucky vanitygen): 1WoLfRUGDx1
How Forum Trust Works
Bitcoin Source Code
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!