cryptoeax / arbbot

Arbitrator, a bitcoin/altcoin arbitrage trading bot
https://gitter.im/cryptoeax-arbbot/Lobby
GNU General Public License v3.0
198 stars 78 forks source link

PHP Fatal error: Uncaught Error: Call to undefined function json_decode() #117

Closed crypto-maniac closed 6 years ago

crypto-maniac commented 6 years ago

Hello , i tried the bot and i got this error , all key/secret are correct on the 3 exchange

[root@mail arbbot]# php main.php
23:55:13: ARBITRATOR V2.0 launching...
23:55:13: Loading config...
23:55:13: Enabling Bittrex...
23:55:13: Enabling Bleutrade...
23:55:13: Enabling Poloniex...
23:55:13: Configured 3 exchanges!
23:55:13: Testing exchange access...
PHP Fatal error:  Uncaught Error: Call to undefined function json_decode() in /var/www/arbbot/bot/BittrexLikeExchange.php:381
Stack trace:
#0 /var/www/arbbot/bot/BittrexLikeExchange.php(440): BittrexLikeExchange->xtractResponse('{"success":true...')
#1 /var/www/arbbot/bot/BittrexLikeExchange.php(364): BittrexLikeExchange->queryAPI('account/getbala...')
#2 /var/www/arbbot/bot/BittrexLikeExchange.php(264): BittrexLikeExchange->queryBalances()
#3 /var/www/arbbot/main.php(104): BittrexLikeExchange->testAccess()
#4 {main}
  thrown in /var/www/arbbot/bot/BittrexLikeExchange.php on line 381

when i leave Bittrex API empty i got this error (it should not take in consideration Bittrex since API/secret key are not set)

23:58:41: Loading config...
23:58:44: Enabling Bittrex...
23:58:45: Enabling Bleutrade...
23:58:45: Enabling Poloniex...
23:58:45: Configured 3 exchanges!
23:58:47: Testing exchange access...
PHP Fatal error:  Uncaught Error: Call to undefined function json_decode() in /var/www/arbbot/bot/BittrexLikeExchange.php:381
Stack trace:
#0 /var/www/arbbot/bot/BittrexLikeExchange.php(440): BittrexLikeExchange->xtractResponse('{"success":fals...')
#1 /var/www/arbbot/bot/BittrexLikeExchange.php(364): BittrexLikeExchange->queryAPI('account/getbala...')
#2 /var/www/arbbot/bot/BittrexLikeExchange.php(264): BittrexLikeExchange->queryBalances()
#3 /var/www/arbbot/main.php(104): BittrexLikeExchange->testAccess()
#4 {main}
  thrown in /var/www/arbbot/bot/BittrexLikeExchange.php on line 381

i have commented the bitrex API line on config.ini to not use it , but its still call Bittrex & make problem

[root@mail arbbot]# php main.php
23:44:42: ARBITRATOR V2.0 launching...
No recipient addresses found in header
23:44:42: Loading config...
23:44:42: Enabling Bittrex...
23:44:42: Bittrex not configured
23:44:42: Enabling Bleutrade...
23:44:42: Enabling Poloniex...
23:44:42: Configured 2 exchanges!
23:44:42: Testing exchange access...
PHP Fatal error:  Uncaught Error: Call to undefined function json_decode() in /var/www/arbbot/bot/BittrexLikeExchange.php:381
Stack trace:
#0 /var/www/arbbot/bot/BittrexLikeExchange.php(440): BittrexLikeExchange->xtractResponse('{"success":"tru...')
#1 /var/www/arbbot/bot/BittrexLikeExchange.php(364): BittrexLikeExchange->queryAPI('account/getbala...')
#2 /var/www/arbbot/bot/BittrexLikeExchange.php(264): BittrexLikeExchange->queryBalances()
#3 /var/www/arbbot/main.php(104): BittrexLikeExchange->testAccess()
#4 {main}
  thrown in /var/www/arbbot/bot/BittrexLikeExchange.php on line 381

Any idea please ? thx you very much

cryptoeax commented 6 years ago

You need to install the php-json package and/or enable the json extension in your php.ini.

crypto-maniac commented 6 years ago

thx you very much ,fixed