Warning: file_put_contents(/var/www/vhosts/cake5/diypt/logs/error.log): Failed to open stream: Permission denied in /var/www/vhosts/cake5/diypt/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 137
Warning (2) : file_put_contents(/var/www/vhosts/cake5/diypt/logs/error.log): Failed to open stream: Permission denied [in /var/www/vhosts/cake5/diypt/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php, line 137]

Warning: file_put_contents(/var/www/vhosts/cake5/diypt/logs/error.log): Failed to open stream: Permission denied in /var/www/vhosts/cake5/diypt/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 137
Warning (2) : file_put_contents(/var/www/vhosts/cake5/diypt/logs/error.log): Failed to open stream: Permission denied [in /var/www/vhosts/cake5/diypt/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php, line 137]

Warning: file_put_contents(/var/www/vhosts/cake5/diypt/logs/error.log) [function.file-put-contents]: Failed to open stream: Permission denied in /var/www/vhosts/cake5/diypt/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 137
Warning (512) : Unable to emit headers. Headers sent in file=/var/www/vhosts/cake5/diypt/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php line=37 [in /var/www/vhosts/cake5/diypt/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 65]

Warning: file_put_contents(/var/www/vhosts/cake5/diypt/logs/error.log) [function.file-put-contents]: Failed to open stream: Permission denied in /var/www/vhosts/cake5/diypt/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 137
Warning (2) : Cannot modify header information - headers already sent by (output started at /var/www/vhosts/cake5/diypt/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /var/www/vhosts/cake5/diypt/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 159]

Warning: file_put_contents(/var/www/vhosts/cake5/diypt/logs/error.log) [function.file-put-contents]: Failed to open stream: Permission denied in /var/www/vhosts/cake5/diypt/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 137
Warning (2) : Cannot modify header information - headers already sent by (output started at /var/www/vhosts/cake5/diypt/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /var/www/vhosts/cake5/diypt/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 192]
Error: Missing Database Connection

Missing Database Connection 📋

Cake\Database\Exception\MissingConnectionException

Connection to Mysql could not be established: SQLSTATE[HY000] [2002] Connection refused

CORE/src/Database/Driver.php at line 192 (edit)
        $retry = new CommandRetry(new ErrorCodeWaitStrategy(static::RETRY_ERROR_CODES, 5), 4);
        try {
            return $retry->run($action);
        } catch (PDOException $e) {
            throw new MissingConnectionException(
                [
                    'driver' => App::shortName(static::class, 'Database/Driver'),
                    'reason' => $e->getMessage(),
                ],
Caused by SQLSTATE[HY000] [2002] Connection refused PDOException
CORE/src/Database/Driver.php at line 181 (edit)
     * @return \PDO
     */
    protected function createPdo(string $dsn, array $config): PDO
    {
        $action = fn () => new PDO(
            $dsn,
            $config['username'] ?: null,
            $config['password'] ?: null,
            $config['flags']

If you want to customize this error message, create templates/Error/missing_connection.php