PDOException (2002)
SQLSTATE[HY000] [2002] No route to host PDOException thrown with message "SQLSTATE[HY000] [2002] No route to host" Stacktrace: #5 PDOException in /home/deployr/subs/apps/src/di.php:83 #4 PDO:__construct in /home/deployr/subs/apps/src/di.php:83 #3 {closure} in /home/deployr/subs/apps/src/vendor/pimple/pimple/src/Pimple/Container.php:122 #2 Pimple\Container:offsetGet in /home/deployr/subs/apps/src/di.php:219 #1 {closure} in /home/deployr/subs/apps/src/vendor/pimple/pimple/src/Pimple/Container.php:122 #0 Pimple\Container:offsetGet in /home/deployr/subs/apps/src/index.php:51
Stack frames (6)
5
PDOException
/di.php83
4
PDO __construct
/di.php83
3
{closure}
/vendor/pimple/pimple/src/Pimple/Container.php122
2
Pimple\Container offsetGet
/di.php219
1
{closure}
/vendor/pimple/pimple/src/Pimple/Container.php122
0
Pimple\Container offsetGet
/index.php51
/home/deployr/subs/apps/src/di.php
 * @return \Box_Crypt
 */
$di['crypt'] = function () use ($di) {
    $crypt = new Box_Crypt();
    $crypt->setDi($di);
 
    return $crypt;
};
 
/*
 * Creates a new PDO object for database connections
 *
 * @param void
 *
 * @return PDO The PDO object used for database connections
 */
$di['pdo'] = function () {
    $config = Config::getProperty('db');
 
    $pdo = new PDO(
        $config['type'] . ':host=' . $config['host'] . ';port=' . $config['port'] . ';dbname=' . $config['name'],
        $config['user'],
        $config['password'],
        [
            PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
            PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
            PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
        ]
    );
 
    if (isset($config['debug']) && $config['debug']) {
        $pdo->setAttribute(PDO::ATTR_STATEMENT_CLASS, ['Box_DbLoggedPDOStatement']);
    }
 
    if ($config['type'] === 'mysql') {
        $pdo->exec('SET NAMES "utf8"');
        $pdo->exec('SET CHARACTER SET utf8');
        $pdo->exec('SET CHARACTER_SET_CONNECTION = utf8');
        $pdo->exec('SET character_set_results = utf8');
        $pdo->exec('SET character_set_server = utf8');
Arguments
  1. "SQLSTATE[HY000] [2002] No route to host"
    
/home/deployr/subs/apps/src/di.php
 * @return \Box_Crypt
 */
$di['crypt'] = function () use ($di) {
    $crypt = new Box_Crypt();
    $crypt->setDi($di);
 
    return $crypt;
};
 
/*
 * Creates a new PDO object for database connections
 *
 * @param void
 *
 * @return PDO The PDO object used for database connections
 */
$di['pdo'] = function () {
    $config = Config::getProperty('db');
 
    $pdo = new PDO(
        $config['type'] . ':host=' . $config['host'] . ';port=' . $config['port'] . ';dbname=' . $config['name'],
        $config['user'],
        $config['password'],
        [
            PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
            PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
            PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
        ]
    );
 
    if (isset($config['debug']) && $config['debug']) {
        $pdo->setAttribute(PDO::ATTR_STATEMENT_CLASS, ['Box_DbLoggedPDOStatement']);
    }
 
    if ($config['type'] === 'mysql') {
        $pdo->exec('SET NAMES "utf8"');
        $pdo->exec('SET CHARACTER SET utf8');
        $pdo->exec('SET CHARACTER_SET_CONNECTION = utf8');
        $pdo->exec('SET character_set_results = utf8');
        $pdo->exec('SET character_set_server = utf8');
/home/deployr/subs/apps/src/vendor/pimple/pimple/src/Pimple/Container.php
    {
        if (!isset($this->keys[$id])) {
            throw new UnknownIdentifierException($id);
        }
 
        if (
            isset($this->raw[$id])
            || !\is_object($this->values[$id])
            || isset($this->protected[$this->values[$id]])
            || !\method_exists($this->values[$id], '__invoke')
        ) {
            return $this->values[$id];
        }
 
        if (isset($this->factories[$this->values[$id]])) {
            return $this->values[$id]($this);
        }
 
        $raw = $this->values[$id];
        $val = $this->values[$id] = $raw($this);
        $this->raw[$id] = $raw;
 
        $this->frozen[$id] = true;
 
        return $val;
    }
 
    /**
     * Checks if a parameter or an object is set.
     *
     * @param string $id The unique identifier for the parameter or object
     *
     * @return bool
     */
    #[\ReturnTypeWillChange]
    public function offsetExists($id)
    {
        return isset($this->keys[$id]);
    }
 
/home/deployr/subs/apps/src/di.php
 * @param void
 *
 * @return \Box_EventManager
 */
$di['events_manager'] = function () use ($di) {
    $service = new Box_EventManager();
    $service->setDi($di);
 
    return $service;
};
 
/*
 * Creates a new session, applying specified security rules depending on the config.php settings.
 *
 * @param void
 *
 * @return \FOSSBilling\Session
 */
$di['session'] = function () use ($di) {
    $handler = new PdoSessionHandler($di['pdo']);
    $session = new FOSSBilling\Session($handler);
    $session->setDi($di);
    $session->setupSession();
 
    return $session;
};
 
/*
 * Creates a new request object based on the current request.
 *
 * @param void
 *
 * @link https://symfony.com/doc/current/components/http_foundation.html
 *
 * @return Symfony\Component\HttpFoundation\Request
 */
$di['request'] = fn (): Request => Request::createFromGlobals();
 
/*
 * @param void
/home/deployr/subs/apps/src/vendor/pimple/pimple/src/Pimple/Container.php
    {
        if (!isset($this->keys[$id])) {
            throw new UnknownIdentifierException($id);
        }
 
        if (
            isset($this->raw[$id])
            || !\is_object($this->values[$id])
            || isset($this->protected[$this->values[$id]])
            || !\method_exists($this->values[$id], '__invoke')
        ) {
            return $this->values[$id];
        }
 
        if (isset($this->factories[$this->values[$id]])) {
            return $this->values[$id]($this);
        }
 
        $raw = $this->values[$id];
        $val = $this->values[$id] = $raw($this);
        $this->raw[$id] = $raw;
 
        $this->frozen[$id] = true;
 
        return $val;
    }
 
    /**
     * Checks if a parameter or an object is set.
     *
     * @param string $id The unique identifier for the parameter or object
     *
     * @return bool
     */
    #[\ReturnTypeWillChange]
    public function offsetExists($id)
    {
        return isset($this->keys[$id]);
    }
 
/home/deployr/subs/apps/src/index.php
// Rewrite for custom pages
if (str_starts_with($url, '/page/')) {
    $url = substr_replace($url, '/custompages/', 0, 6);
}
 
// Set the final URL
$_GET['_url'] = $url;
$http_err_code = $_GET['_errcode'] ?? null;
 
$debugBar['time']->startMeasure('session_start', 'Starting / restoring the session');
 
/*
 * Workaround: Session IDs get reset when using PGs like PayPal because of the `samesite=strict` cookie attribute, resulting in the client getting logged out.
 * Internally the return and cancel URLs get a restore_session GET parameter attached to them with the proper session ID to restore, so we do so here.
 */
if (!empty($_GET['restore_session'])) {
    session_id($_GET['restore_session']);
}
 
$di['session'];
$debugBar['time']->stopMeasure('session_start');
 
if (strncasecmp($url, ADMIN_PREFIX, strlen(ADMIN_PREFIX)) === 0) {
    define('ADMIN_AREA', true);
    $appUrl = str_replace(ADMIN_PREFIX, '', preg_replace('/\?.+/', '', $url));
    $app = new Box_AppAdmin([], $debugBar);
} else {
    define('ADMIN_AREA', false);
    $appUrl = $url;
    $app = new Box_AppClient([], $debugBar);
}
 
$app->setUrl($appUrl);
$app->setDi($di);
 
$debugBar['time']->startMeasure('translate', 'Setting up translations');
$di['translate']();
$debugBar['time']->stopMeasure('translate');
 
// If HTTP error code has been passed, handle it.

Environment & details:

Key Value
PHP Version
"8.3.29"
Error code
2002
Instance ID
"0d930cbf-ccf6-41ba-999d-8d96b585496c"
Key Value
_url
"/"
empty
empty
empty
empty
Key Value
TEMP
"/storage/tmp"
TMPDIR
"/storage/tmp"
TMP
"/storage/tmp"
HOSTNAME
""
USER
"deployr"
HOME
"/home/deployr"
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
"*/*"
HTTP_CONNECTION
"upgrade"
HTTP_X_REAL_IP
"216.73.216.14"
HTTP_HOST
"apps.deployr.io"
PHP_VALUE
"""
\n
error_log=/home/deployr/logs/php/error.log;\n
memory_limit=2G;\n
max_execution_time=300;\n
max_input_time=120;\n
max_input_vars=20000;\n
post_max_size=256M;\n
upload_max_filesize=1G;\n
date.timezone=America/Sao_Paulo;\n
display_errors=on;\n
opcache.revalidate_freq=0;
"""
HTTPS
"on"
SCRIPT_FILENAME
"/home/deployr/subs/apps/src/index.php"
REDIRECT_STATUS
"200"
SERVER_NAME
"apps.deployr.io"
SERVER_PORT
"443"
SERVER_ADDR
"10.125.0.20"
REMOTE_PORT
""
REMOTE_ADDR
"216.73.216.14"
SERVER_SOFTWARE
"nginx/1.28.0"
GATEWAY_INTERFACE
"CGI/1.1"
REQUEST_SCHEME
"http"
SERVER_PROTOCOL
"HTTP/1.1"
DOCUMENT_ROOT
"/home/deployr/subs/apps/src"
DOCUMENT_URI
"/index.php"
REQUEST_URI
"/"
SCRIPT_NAME
"/index.php"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
""
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1771493950.8157
REQUEST_TIME
1771493950
empty
0. Whoops\Handler\PrettyPageHandler