Bitcoin Forum
November 09, 2024, 02:47:47 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to define datadir from PHP JSON RPC  (Read 738 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
      ▄▄██████████▄▄
    ▄███▀▀      ▀▀█▀   ▄▄
   ███▀              ▄███
  ███              ▄███▀   ▄▄
 ███▌  ▄▄▄▄      ▄███▀   ▄███
▐███  ██████   ▄███▀   ▄███▀
███▌ ███  ███▄███▀   ▄███▀
███▌ ███   ████▀   ▄███▀
███▌  ███   █▀   ▄███▀  ███
▐███   ███     ▄███▀   ███
 ███▌   ███  ▄███▀     ███
  ███    ██████▀      ███
   ███▄             ▄███
    ▀███▄▄       ▄▄███▀
      ▀▀███████████▀▀
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1452



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!