/home/lienzohost/web/dxs1referenciaanterior.lienzohost.com/public_html/vendor/symfony/filesystem/Filesystem.php
throw new IOException(\sprintf('Failed to copy the whole content of "%s" to "%s" (%g of %g bytes copied).', $originFile, $targetFile, $bytesCopied, $bytesOrigin), 0, null, $originFile);
}
}
}
}
/**
* Creates a directory recursively.
*
* @throws IOException On any directory creation failure
*/
public function mkdir(string|iterable $dirs, int $mode = 0o777): void
{
foreach ($this->toIterable($dirs) as $dir) {
if (is_dir($dir)) {
continue;
}
if (!self::box('mkdir', $dir, $mode, true) && !is_dir($dir)) {
throw new IOException(\sprintf('Failed to create "%s": ', $dir).self::$lastError, 0, null, $dir);
}
}
}
/**
* Checks the existence of files or directories.
*/
public function exists(string|iterable $files): bool
{
$maxPathLength = \PHP_MAXPATHLEN - 2;
foreach ($this->toIterable($files) as $file) {
if (\strlen($file) > $maxPathLength) {
throw new IOException(\sprintf('Could not check if file exist because path length exceeds %d characters.', $maxPathLength), 0, null, $file);
}
if (!file_exists($file)) {
return false;
}
}
Arguments
"Failed to create "/home/lienzohost/web/clientes.lienzohost.com/public_html/data": mkdir(): open_basedir restriction in effect. File(/home/lienzohost/web/clientes.lienzohost.com/public_html/data) is not within the allowed path(s): (/home/lienzohost/.composer:/home/lienzohost/web/dxs1referenciaanterior.lienzohost.com/public_html:/home/lienzohost/web/dxs1referenciaanterior.lienzohost.com/private:/home/lienzohost/web/dxs1referenciaanterior.lienzohost.com/public_shtml:/home/lienzohost/tmp:/tmp:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt)"
/home/lienzohost/web/dxs1referenciaanterior.lienzohost.com/public_html/library/FOSSBilling/UpdateFinalization.php
}
private function readState(): ?array
{
if (!$this->filesystem->exists($this->statePath)) {
return null;
}
try {
$decoded = json_decode($this->filesystem->readFile($this->statePath), true, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException|IOException) {
return null;
}
return is_array($decoded) ? $decoded : null;
}
private function writeState(array $state): void
{
$this->filesystem->mkdir(PATH_DATA, 0o755);
$this->filesystem->dumpFile($this->statePath, self::encodeJson($state));
}
private function enableMaintenanceMode(): void
{
$config = Config::getConfig();
$maintenanceMode = self::normalizeMaintenanceMode($config['maintenance_mode'] ?? []);
$maintenanceMode['enabled'] = true;
// Keep login and finalization reachable while every other public/client
// route remains protected by maintenance mode.
$maintenanceMode['allowed_urls'] = array_values(array_unique(array_merge(
(array) ($maintenanceMode['allowed_urls'] ?? []),
$this->getFinalizationAllowedUrls()
)));
$config['maintenance_mode'] = $maintenanceMode;
Config::setConfig($config, false);
}
/home/lienzohost/web/dxs1referenciaanterior.lienzohost.com/public_html/library/FOSSBilling/UpdateFinalization.php
if ($this->stateRequiresFinalization($existing)) {
return $existing;
}
$state = [
'status' => self::STATUS_PENDING,
'from_version' => $fromVersion,
'target_version' => $targetVersion,
'branch' => $context['branch'] ?? Config::getProperty('update_branch', 'release'),
'update_type' => $context['update_type'] ?? $this->detectUpdateType($fromVersion, $targetVersion),
'source' => $context['source'] ?? 'update',
'created_at' => date(DATE_ATOM),
'finalized_at' => null,
'completed_at' => null,
'maintenance_mode' => self::normalizeMaintenanceMode(Config::getProperty('maintenance_mode', [])),
];
// Write the pending state before enabling maintenance mode so a failed
// config write still leaves recoverable evidence that finalization is pending.
$this->writeState($state);
$this->enableMaintenanceMode();
return $state;
}
/**
* Runs config/database patches with the currently loaded codebase.
*
* This is intentionally separate from completeFinalization(): after patches
* run, the admin still has a review step before maintenance mode is restored.
*/
public function finalizeUpdate(): array
{
$state = $this->ensureCurrentVersionFinalization();
try {
$this->clearCache();
$patcher = $this->createPatcher();
$patcher->applyConfigPatches(force: true);
/home/lienzohost/web/dxs1referenciaanterior.lienzohost.com/public_html/library/FOSSBilling/UpdateFinalization.php
'pending_patches' => $this->getAvailablePatchCount(),
];
}
public function ensureCurrentVersionFinalization(): ?array
{
$state = $this->readState();
if ($this->isCompleteForCurrentVersion($state)) {
return null;
}
// Pending/finalized states contain the original maintenance-mode state,
// so keep them intact until the admin completes finalization.
if ($this->stateRequiresFinalization($state)) {
return $state;
}
$fromVersion = is_string($state['version'] ?? null) ? $state['version'] : null;
return $this->createPendingState(
$fromVersion,
Version::VERSION,
[
'source' => $fromVersion !== null ? 'version-state-mismatch' : 'missing-finalization-state',
'branch' => Config::getProperty('update_branch', 'release'),
]
);
}
public function createPendingState(?string $fromVersion, string $targetVersion, array $context = []): array
{
$existing = $this->readState();
if ($this->stateRequiresFinalization($existing)) {
return $existing;
}
$state = [
'status' => self::STATUS_PENDING,
'from_version' => $fromVersion,
'target_version' => $targetVersion,
/home/lienzohost/web/dxs1referenciaanterior.lienzohost.com/public_html/load.php
$scheme = Config::getProperty('security.force_https', true) || $request->isSecure() ? 'https://' : 'http://';
// Keep the app working correctly if the URL didn't get correctly updated
$url = str_replace(['https://', 'http://'], '', Config::getProperty('url'));
define('SYSTEM_URL', $scheme . $url);
// Set the default interface.
define('BIND_TO', Tools::getDefaultInterface());
// Initial setup and checks passed, now we setup our custom autoloader.
require Path::join(PATH_LIBRARY, 'FOSSBilling', 'Autoloader.php');
$loader = new FOSSBilling\AutoLoader();
$loader->register();
// Load the DI container.
global $di;
$di = require Path::join(PATH_ROOT, 'di.php');
if (!Environment::isCLI() && !Environment::isTesting()) {
$di['update_finalization']->ensureCurrentVersionFinalization();
}
// Now that the config file is loaded, we can enable Sentry.
SentryHelper::registerSentry();
}
/*
* Post-initialization.
*/
function postInit(): void
{
// Set error and exception handlers, and default logging settings.
ini_set('log_errors', '1');
ini_set('html_errors', false);
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');
/home/lienzohost/web/dxs1referenciaanterior.lienzohost.com/public_html/load.php
// Set error and exception handlers, and default logging settings.
ini_set('log_errors', '1');
ini_set('html_errors', false);
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();
// Perform post-initialization (setting error handlers, etc).
postInit();
/home/lienzohost/web/dxs1referenciaanterior.lienzohost.com/public_html/index.php
<?php
declare(strict_types=1);
/**
* Copyright 2022-2025 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 __DIR__ . DIRECTORY_SEPARATOR . 'load.php';
global $di;
use DebugBar\DataCollector\TimeDataCollector;
use FOSSBilling\Http\RequestFactory;
use Symfony\Component\HttpFoundation\Response;
$config = FOSSBilling\Config::getConfig();
$debugBar = null;
$timeCollector = null;
/* @var Symfony\Component\HttpFoundation\Request $request */
global $request;
if ((bool) ($config['debug_and_monitoring']['debug'] ?? false)) {
// 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');
Arguments
"/home/lienzohost/web/dxs1referenciaanterior.lienzohost.com/public_html/load.php"