user26456: i used bitcoind with jsonrpc service. 
but i added regtest=1 in bitcoin.conf at .bitcoin folder.
used:

bitcoin-cli -regtest generate 101
bitcoin-cli -regtest getbalance
50.00000000

but I can't see the balance in php.

$bitcoin->getbalance()

it doesn't show me the balance. it returns nothing.
if I remove regtest=1 from bitcoin.conf and start bitcoind -daemon.

$bitcoin->getbalance()
  it gives me the the real server balance.

what is solution for this problem??? 

user3697: Very likely you need to tell your PHP JSON RPC client to connect to the right port.
If you start bitcoind without -regtest (= main net), it opens up the RPC server on port 8332.
If you use -regtest, the port will be 18332.
I can't see what kind of PHP JSON RPC client you are using, but there must be a way to tell it should use port 18332.

26456: <p>i used bitcoind with jsonrpc service. </p>

<p>but i added <code>regtest=1</code> in <code>bitcoin.conf</code> at <code>.bitcoin</code> folder.</p>

<p>used:</p>

<blockquote>
  <p>bitcoin-cli -regtest generate 101</p>
  
  <p>bitcoin-cli -regtest getbalance</p>
  
  <p>50.00000000</p>
</blockquote>

<p>but I can't see the balance in php.</p>

<blockquote>
  <p>$bitcoin->getbalance()</p>
</blockquote>

<p>it doesn't show me the balance. it returns nothing.</p>

<p>if I remove <code>regtest=1</code> from <code>bitcoin.conf</code> and start <code>bitcoind -daemon</code>.</p>

<blockquote>
  <p>$bitcoin->getbalance()
  it gives me the the real server balance.</p>
</blockquote>

<p>what is solution for this problem??? </p>
 3697: <p>Very likely you need to tell your PHP JSON RPC client to connect to the right port.</p>

<p>If you start bitcoind <strong>without</strong> <code>-regtest</code> (= main net), it opens up the RPC server on port <code>8332</code>.
If you use <code>-regtest</code>, the port will be <code>18332</code>.</p>

<p>I can't see what kind of PHP JSON RPC client you are using, but there must be a way to tell it should use port 18332.</p>
