Title: bitcoin PHP json rpc error "JSON value is not an integer as expected" Post by: btctousd81 on January 03, 2018, 12:01:02 AM i am trying to connect to my local bitcoind using php json library https://github.com/aceat64/EasyBitcoin-PHP specified in https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#PHP
i am trying to get block data. e.g. Code: $bitcoin = new Bitcoin('user','password'); i am getting JSON value is not an integer as expected on further debuggng $curl_error = curl_error($curl); Code: ( this happens only with blockheight 502284 and not with other blocks., if i do this in command line using bitcoin-cli , then i can get proper output., but calling from php json/rpc i am getting warning and no result. how can i fix this ? thanks for your time.[/code] EDIT 1 : on further inspection it seems this is only affected to getblockhash as it returns output in int instead of string., and while json doesnt works properly if int starts with 0 ., so it gives warning ., thats what i think. EDIT 2 : if i do this Code:
i am getting proper output, so its not issue with bitcoind., but looks like php library. |