db-update info

This commit is contained in:
Arionum
2018-01-08 16:11:15 +02:00
parent 885b121b9d
commit 68b3abbe32
2 changed files with 10 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ Arionum (ARO) cryptocurrency node
Requires php 7.1 and php-gmp Requires php 7.1 and php-gmp
This app should only be run in the main directory of the domain/subdomain, ex: http://111.111.111.111/
Official website: https://www.arionum.com Official website: https://www.arionum.com

View File

@@ -8,6 +8,13 @@ date_default_timezone_set("Europe/Amsterdam");
//error_reporting(E_ALL & ~E_NOTICE); //error_reporting(E_ALL & ~E_NOTICE);
error_reporting(0); error_reporting(0);
ini_set('display_errors',"off"); ini_set('display_errors',"off");
if(php_sapi_name() !== 'cli'&&substr_count($_SERVER['PHP_SELF'],"/")>1){
die("This application should only be run in the main directory /");
}
require_once("include/config.inc.php"); require_once("include/config.inc.php");
require_once("include/db.inc.php"); require_once("include/db.inc.php");
require_once("include/functions.inc.php"); require_once("include/functions.inc.php");
@@ -45,9 +52,11 @@ if(file_exists("tmp/db-update")){
$res=unlink("tmp/db-update"); $res=unlink("tmp/db-update");
if($res){ if($res){
echo "Updating db schema! Please refresh!\n";
require_once("include/schema.inc.php"); require_once("include/schema.inc.php");
exit; exit;
} }
echo "Could not access the tmp/db-update file. Please give full permissions to this file\n";
} }
if($_config['dbversion']<2) exit; if($_config['dbversion']<2) exit;