Exception (2)
For security reasons, you have to delete the install directory before you can use BAIDINGtokens. Exception thrown with message "For security reasons, you have to delete the install directory before you can use BAIDINGtokens." Stacktrace: #2 Exception in /var/www/tokens.baiding.io/src/load.php:40 #1 checkInstaller in /var/www/tokens.baiding.io/src/load.php:288 #0 require in /var/www/tokens.baiding.io/src/index.php:12
Stack frames (3)
2
Exception
/load.php:40
1
checkInstaller
/load.php:288
0
require
/index.php:12
/var/www/tokens.baiding.io/src/load.php
use Whoops\Handler\PrettyPageHandler;
use Whoops\Run;

/*
 * Check if the installer is present.
 */
function checkInstaller(): void
{
    global $filesystem;

    // Ignore this check if not in production environment.
    if (!Environment::isProduction()) {
        return;
    }

    // Check if /install directory still exists after installation has been completed.
    if ($filesystem->exists(PATH_CONFIG) && $filesystem->exists(Path::join('install', 'install.php'))) {
        // Throw exception only if debug mode is NOT enabled.
        if (!empty(Config::getProperty('debug_and_monitoring.debug'))) {
            throw new Exception('For security reasons, you have to delete the install directory before you can use BAIDINGtokens.', 2);
        }
    }

    // If the config file exists and not install.php, but the install folder does, perform some cleanup.
    if ($filesystem->exists(PATH_CONFIG) && $filesystem->exists(Path::normalize('install')) && !DEBUG) {
        $filesystem->remove('install');
    }
}

/*
 * Check if SSL required, and enforce if so.
 */
function checkSSL(): void
{
    global $request;

    if (!empty(Config::getProperty('security.force_https')) && Config::getProperty('security.force_https') && !Environment::isCLI()) {
        if (!Tools::isHTTPS()) {
            header('Location: https://' . $request->getHost() . $request->getRequestUri());
            exit;
Arguments
  1. "For security reasons, you have to delete the install directory before you can use BAIDINGtokens."
    
/var/www/tokens.baiding.io/src/load.php
    ini_set('error_log', Path::join(PATH_LOG, 'php_error.log'));
    error_reporting(E_ALL);

    if (DEBUG) {
        ini_set('display_errors', '1');
        ini_set('display_startup_errors', '1');
    } else {
        ini_set('display_errors', '0');
        ini_set('display_startup_errors', '0');
    }
}

// Perform pre-initialization (loading required dependencies, etc.).
preInit();

// Initialize the application.
init();

// Verify the installer was removed.
checkInstaller();

// Check if SSL required, and enforce if so.
checkSSL();

// Check web server and web server settings.
checkWebServer();

// Check whether the patcher needs to be run.
checkUpdatePatcher();

// Perform post-initialization (setting error handlers, etc).
postInit();
 
/var/www/tokens.baiding.io/src/index.php
<?php

/**
 * Copyright 2022-2025 BAIDINGtokens
 * Copyright 2011-2021 BoxBilling, Inc.
 * SPDX-License-Identifier: Apache-2.0.
 *
 * @copyright BAIDINGtokens (https://www.fossbilling.org)
 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache-2.0
 */

require __DIR__ . DIRECTORY_SEPARATOR . 'load.php';
global $di;

use DebugBar\DataCollector\TimeDataCollector;

// Setting up the debug bar
$debugBar = new DebugBar\StandardDebugBar();
$timeCollector = $debugBar->getCollector('time');

if (!$timeCollector instanceof TimeDataCollector) {
    throw new RuntimeException('Time collector not found in debug bar.');
}

// PDO collector
$pdoCollector = new DebugBar\DataCollector\PDO\PDOCollector();

// RedBean
$pdoCollector->addConnection($di['pdo'], 'RedBeanPHP');

// Doctrine
$connection = $di['em']->getConnection();
$native = $connection->getNativeConnection();

if ($native instanceof PDO) {
    $pdoCollector->addConnection($native, 'Doctrine');
}

$debugBar->addCollector($pdoCollector);

Arguments
  1. "/var/www/tokens.baiding.io/src/load.php"
    

Environment & details:

Key Value
PHP Version
"8.3.6"
Error code
2
Instance ID
"6b8a9d59-1d5a-4b4e-8df4-1f65e833d9b0"
empty
empty
empty
empty
empty
Key Value
USER
"www-data"
HOME
"/var/www"
HTTP_HOST
"tokens.baiding.io"
HTTP_ACCEPT_ENCODING
"gzip, br, zstd, deflate"
HTTP_USER_AGENT
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
HTTP_ACCEPT
"*/*"
REDIRECT_STATUS
"200"
SERVER_NAME
"tokens.baiding.io"
SERVER_PORT
"443"
SERVER_ADDR
"10.7.0.4"
REMOTE_USER
""
REMOTE_PORT
"38689"
REMOTE_ADDR
"216.73.216.29"
SERVER_SOFTWARE
"nginx/1.24.0"
GATEWAY_INTERFACE
"CGI/1.1"
HTTPS
"on"
REQUEST_SCHEME
"https"
SERVER_PROTOCOL
"HTTP/1.1"
DOCUMENT_ROOT
"/var/www/tokens.baiding.io/src"
DOCUMENT_URI
"/index.php"
REQUEST_URI
"/sitemap.xml"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
""
SCRIPT_NAME
"/index.php"
SCRIPT_FILENAME
"/var/www/tokens.baiding.io/src/index.php"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1774380759.3376
REQUEST_TIME
1774380759
empty
0. Whoops\Handler\PrettyPageHandler