/hox/hoxtinco/public_html/clientes/load.php
$url = 'https://' . $hostname . $_SERVER['REQUEST_URI'];
header('Location: ' . $url);
exit;
}
}
}
}
/*
* Check the web server config.
*/
function checkWebServer(): void
{
$filesystem = new Filesystem();
// Check for missing required .htaccess on Apache and Apache-compatible web servers.
$webSever = SentryHelper::estimateWebServer();
if ($webSever === 'Apache' || $webSever === 'Litespeed') {
if (!$filesystem->exists('.htaccess')) {
throw new Exception('Missing .htaccess file', 5);
}
}
}
/*
* Error handler.
*/
function errorHandler(int $number, string $message, string $file, int $line)
{
// Just some housekeeping to ensure a few things we rely on are loaded.
if (!class_exists('\\' . FOSSBilling\ErrorPage::class)) {
require_once PATH_LIBRARY . DIRECTORY_SEPARATOR . 'FOSSBilling' . DIRECTORY_SEPARATOR . 'ErrorPage.php';
}
if (!class_exists('\\' . SentryHelper::class)) {
require_once PATH_LIBRARY . DIRECTORY_SEPARATOR . 'FOSSBilling' . DIRECTORY_SEPARATOR . 'SentryHelper.php';
}
// If it's an exception, handle it. Otherwise we don't need to do anything as PHP will log it for us.
if ($number === E_RECOVERABLE_ERROR) {
Arguments
/hox/hoxtinco/public_html/clientes/load.php
define('INSTANCE_ID', Config::getProperty('info.instance_id', 'Unknown'));
// Initial setup and checks passed, now we setup our custom autoloader.
require PATH_LIBRARY . DIRECTORY_SEPARATOR . 'FOSSBilling' . DIRECTORY_SEPARATOR . 'Autoloader.php';
$loader = new FOSSBilling\AutoLoader();
$loader->register();
define('BIND_TO', FOSSBilling\Tools::getDefaultInterface());
// Now that the config file is loaded, we can enable Sentry
SentryHelper::registerSentry();
// Verify the installer was removed.
checkInstaller();
// Check if SSL required, and enforce if so.
checkSSL();
// Check web server and web server settings.
checkWebServer();
// Set error and exception handlers, and default logging settings.
ini_set('log_errors', '1');
ini_set('html_errors', false);
ini_set('error_log', PATH_LOG . DIRECTORY_SEPARATOR . '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');
}
/hox/hoxtinco/public_html/clientes/index.php
<?php
/**
* Copyright 2022-2024 FOSSBilling
* Copyright 2011-2021 BoxBilling, Inc.
* SPDX-License-Identifier: Apache-2.0.
*
* @copyright FOSSBilling (https://www.fossbilling.org)
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache-2.0
*/
require_once __DIR__ . '/load.php';
$di = include __DIR__ . '/di.php';
// Setting up the debug bar
$debugBar = new DebugBar\StandardDebugBar();
$debugBar['request']->useHtmlVarDumper();
$debugBar['messages']->useHtmlVarDumper();
$config = FOSSBilling\Config::getConfig();
$config['info']['salt'] = '********';
$config['db'] = array_fill_keys(array_keys($config['db']), '********');
$configCollector = new DebugBar\DataCollector\ConfigCollector($config);
$configCollector->useHtmlVarDumper();
$debugBar->addCollector($configCollector);
// Now move onto the actual process of setting up the app & routing
$url = $_GET['_url'] ?? $_SERVER['PATH_INFO'] ?? '';
$http_err_code = $_GET['_errcode'] ?? null;
if ($url === '/run-patcher') {
$patcher = new FOSSBilling\UpdatePatcher();
$patcher->setDi($di);
try {
$patcher->applyConfigPatches();
$patcher->applyCorePatches();
$di['tools']->emptyFolder(PATH_CACHE);
Arguments
"/hox/hoxtinco/public_html/clientes/load.php"