From bfd3751a904d8a9d4e7b8c3046ab474129250efb Mon Sep 17 00:00:00 2001 From: Arionum Date: Tue, 9 Jan 2018 11:07:50 +0200 Subject: [PATCH] bcmath --- README.md | 2 +- include/functions.inc.php | 4 ++-- include/init.inc.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 898458d..a69b104 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Arionum (ARO) cryptocurrency node -Requires php 7.2, mysql/mariadb, php-pdo and php-gmp +Requires php 7.2, mysql/mariadb, php-pdo, php-bcmath and php-gmp This app should only be run in the main directory of the domain/subdomain, ex: http://111.111.111.111/ diff --git a/include/functions.inc.php b/include/functions.inc.php index bed18af..6ba644e 100755 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -23,7 +23,7 @@ function _log($data){ $date=date("[Y-m-d H:s:]"); $trace=debug_backtrace(); $location=$trace[1]['class'].'->'.$trace[1]['function'].'()'; - //echo "$date [$location] $data\n"; + if(php_sapi_name() === 'cli') "$date [$location] $data\n"; } function pem2hex ($data) { @@ -209,4 +209,4 @@ function coin2hex($data){ $bin= base58_decode($data); return bin2hex($bin); } -?> \ No newline at end of file +?> diff --git a/include/init.inc.php b/include/init.inc.php index 3e666df..256a7db 100755 --- a/include/init.inc.php +++ b/include/init.inc.php @@ -29,7 +29,7 @@ if(!$db) die("Could not connect to the DB backend."); if (!extension_loaded("openssl") && !defined("OPENSSL_KEYTYPE_EC")) api_err("Openssl php extension missing"); if (!extension_loaded("gmp")) api_err("gmp php extension missing"); if (!extension_loaded('PDO')) api_err("pdo php extension missing"); - +if (!extension_loaded("bcmath")) api_err("bcmath php extension missing"); if(floatval(phpversion())<7.2) api_err("The minimum php version required is 7.2");