How to resolve "error of type null" on easybitcoin line 187

75 views Asked by At

I have set-up bitcoin core on my windows and I have bitcoin-qt running. I am also using easybitcoin.php library to run rpc commands but when i try to run json rpc commands I dont get the results I want, I get this error "Trying to access array offset on value of type null in C:\xampp\htdocs\test7\easybitcoin.php on line 187"

This is my bitcoin conf file

prune=600
maxconnection=20
maxuploadtarget=20
rpcuser=XXXXXXXXX
rpcpassword=XXXXXXX
server=1
keypool=10000
port=8332
rpcallowip=0.0.0.0/0 **I have done this because bitcoin-qt seems to be running on address 0.0.0.0 on my    xamp**
rpcbind=0.0.0.0
2

There are 2 answers

0
crim_sid On

Now I found the error, you are running bitcoin-qt.exe right ? so if you are running it then bitcoind.exe won't run so stop the bitcoin-qt and then start the bitcoind with proper rpc attributes.

then access your easybitcoin page it will work.

0
crim_sid On

More precisely issue is from bitcore wallet, it is not returning anything. the code you are using is not reaching to localhost:8332.