Project

General

Profile

Actions

Bug #90535

closed

10.3.0 throws PHP Warning: mysqli_stmt::bind_param(): Couldn't fetch mysqli_stmt in /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php line 236

Added by Timo Poppinga over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
Start date:
2020-02-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Open an page in TYPO3 Backend List and Page module throws a warning.

This didn't happen with TYPO3 10.2.2

typo3/sysext/backend/Classes/Utility/BackendUtility.php
Line 641

$statement = $queryBuilder->execute();
$runtimeCache->set('getPageForRootlineStatement-' . $statementCacheIdent, $statement);
} else {
$statement->bindValue(1, (int)$uid);
$statement->execute(); // this will trigger the waring alter on in doctrin
}
$row = $statement->fetch();
$statement->closeCursor();

vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
Line 236

$values[$parameter] = $value;
}
if (! $this->_stmt->bind_param($types, ...$values)) { // this triggered is the warning
throw new MysqliException($this->_stmt->error, $this->_stmt->sqlstate, $this->_stmt->errno);
}
$this->sendLongData($streams);

Frontend works fine. If wanted or needed i can give access to the Installation


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Task #90104: Introduce prepared statement for BackendUtility::getPageForRootlineClosedMarkus Klein2020-01-13

Actions
Related to TYPO3 Core - Bug #91206: PDOException "You cannot serialize or unserialize PDOStatement instances" in PopulatePageSlugs wizardClosed2020-04-27

Actions
Actions #1

Updated by Timo Poppinga over 4 years ago

same for /typo3/index.php?route=%2Fajax%2Fcontext-menu&token=2eb215ab8a434a5d1b473425f2cf08fbe4efc8d9&table=pages&uid=10&

Actions #2

Updated by Timo Poppinga over 4 years ago

  • Subject changed from 10.3.0 throws PHP Warning: mysqli_stmt::bind_param(): Couldn't fetch mysqli_stmt in /html/staging.p1040-zdreicom-webpage/releases/134/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php line 236 to 10.3.0 throws PHP Warning: mysqli_stmt::bind_param(): Couldn't fetch mysqli_stmt in /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php line 236
Actions #3

Updated by Georg Ringer over 4 years ago

  • Related to Task #90104: Introduce prepared statement for BackendUtility::getPageForRootline added
Actions #4

Updated by Georg Ringer over 4 years ago

might be related to #90104

Actions #5

Updated by Markus Klein over 4 years ago

Which mysql server version are you using?
What driver is used in TYPO3_CONF_VARS/DB/Connections/Default/driver?

Actions #6

Updated by Georg Ringer over 4 years ago

  • Status changed from New to Needs Feedback
Actions #7

Updated by Timo Poppinga over 4 years ago

TYPO3-Version
10.3.0
Webserver
Apache
PHP-Version
7.2.10
Datenbank (Default)
MySQL 5.5.62
Anwendungskontext
Production
Composer-Modus
Aktiviert
Betriebssystem
Linux 4.19.44-gentoo-mw1
Letzter Lauf des Planer
25-02-20 um 22:19, Dauer 0 Min, (gestartet automatisch)

charset = utf8mb4
dbname = **
driver = mysqli
host =
**
password = **
port =
**
tableoptions
charset = utf8mb4
collate = utf8mb4_unicode_ci
user = **
Actions #8

Updated by Edward A. Gabdullin over 4 years ago

I have the same error

Markus Klein wrote:

Which mysql server version are you using?

MariaDB 10.3.21 database server

What driver is used in TYPO3_CONF_VARS/DB/Connections/Default/driver?

mysqli


(1/1) Doctrine\DBAL\Driver\Mysqli\MysqliException

in /var/www/html/typo3_src-10.3.0/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php line 237

            $values[$parameter] = $value;
        }

        if (! $this->_stmt->bind_param($types, ...$values)) {
            throw new MysqliException($this->_stmt->error, $this->_stmt->sqlstate, $this->_stmt->errno);
        }

        $this->sendLongData($streams);
    }

at Doctrine\DBAL\Driver\Mysqli\MysqliStatement->bindTypedParameters()
in /var/www/html/typo3_src-10.3.0/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php line 146

                if (! $this->bindUntypedValues($params)) {
                    throw new MysqliException($this->_stmt->error, $this->_stmt->errno);
                }
            } else {
                $this->bindTypedParameters();
            }
        }

        if (! $this->_stmt->execute()) {

at Doctrine\DBAL\Driver\Mysqli\MysqliStatement->execute()
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Utility/BackendUtility.php line 461

                $statement = $queryBuilder->execute();
                $runtimeCache->set('getPageForRootlineStatement-' . $statementCacheIdent, $statement);
            } else {
                $statement->bindValue(1, (int)$uid);
                $statement->execute();
            }
            $row = $statement->fetch();
            $statement->closeCursor();

at TYPO3\CMS\Backend\Utility\BackendUtility::getPageForRootline(1, '', false, array())
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Utility/BackendUtility.php line 350

            $loopCheck = 100;
            $theRowArray = [];
            while ($uid != 0 && $loopCheck) {
                $loopCheck--;
                $row = self::getPageForRootline($uid, $clause, $workspaceOL, $additionalFields);
                if (is_array($row)) {
                    $uid = $row['pid'];
                    $theRowArray[] = $row;
                } else {

at TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine(1)
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Middleware/SiteResolver.php line 62

        if (MathUtility::canBeInterpretedAsInteger($pageId)) {
            $pageId = (int)$pageId;
            $rootLine = null;
            if ($pageId > 0) {
                $rootLine = BackendUtility::BEgetRootLine($pageId);
            }
            $site = $this->siteMatcher->matchByPageId($pageId, $rootLine);
            $request = $request->withAttribute('site', $site);
        }

at TYPO3\CMS\Backend\Middleware\SiteResolver->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Middleware/AdditionalResponseHeaders.php line 39

     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $response = $handler->handle($request);
        foreach ($GLOBALS['TYPO3_CONF_VARS']['BE']['HTTP']['Response']['Headers'] ?? [] as $header) {
            [$headerName, $value] = explode(':', $header, 2);
            $response = $response->withAddedHeader($headerName, trim($value));
        }

at TYPO3\CMS\Backend\Middleware\AdditionalResponseHeaders->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Middleware/OutputCompression.php line 45

        ob_clean();
        // Initialize output compression if configured
        $this->initializeOutputCompression();

        return $handler->handle($request);
    }

    /**
     * Initialize output compression if configured

at TYPO3\CMS\Backend\Middleware\OutputCompression->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php line 71

        // @todo: once this logic is in this method, the redirect URL should be handled as response here
        $GLOBALS['BE_USER']->backendCheckLogin($this->isLoggedInBackendUserRequired($pathToRoute));
        $GLOBALS['LANG'] = LanguageService::createFromUserPreferences($GLOBALS['BE_USER']);

        $response = $handler->handle($request);

        // Additional headers to never cache any PHP request should be sent at any time when
        // accessing the TYPO3 Backend
        return $this->applyHeadersToResponse($response);

at TYPO3\CMS\Backend\Middleware\BackendUserAuthenticator->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Middleware/BackendRouteInitialization.php line 55

        // Add the route path to the request
        $request = $request->withAttribute('routePath', $pathToRoute);

        return $handler->handle($request);
    }
}

at TYPO3\CMS\Backend\Middleware\BackendRouteInitialization->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Middleware/ForcedHttpsBackendRedirector.php line 53

            [$server, $address] = explode('/', $url, 2);
            return new RedirectResponse('https://' . $server . $sslPortSuffix . '/' . $address);
        }

        return $handler->handle($request);
    }
}

at TYPO3\CMS\Backend\Middleware\ForcedHttpsBackendRedirector->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Middleware/LockedBackendGuard.php line 71

            $request->getAttribute('normalizedParams')->getRemoteAddress(),
            trim((string)$GLOBALS['TYPO3_CONF_VARS']['BE']['IPmaskList'])
        );

        return $handler->handle($request);
    }

    /**
     * Check adminOnly configuration variable and redirects to an URL in file typo3conf/LOCK_BACKEND

at TYPO3\CMS\Backend\Middleware\LockedBackendGuard->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Middleware/NormalizedParamsAttribute.php line 43

     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $request = $request->withAttribute('normalizedParams', NormalizedParams::createFromRequest($request));
        return $handler->handle($request);
    }
}

at TYPO3\CMS\Core\Middleware\NormalizedParamsAttribute->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 76

     * @return ResponseInterface
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        return $this->tip->handle($request);
    }

    /**
     * Seed the middleware stack with the inner request handler

at TYPO3\CMS\Core\Http\MiddlewareDispatcher->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/AbstractApplication.php line 83

     * @return ResponseInterface
     */
    protected function handle(ServerRequestInterface $request): ResponseInterface
    {
        return $this->requestHandler->handle($request);
    }

    /**
     * Set up the application and shut it down afterwards

at TYPO3\CMS\Core\Http\AbstractApplication->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Http/Application.php line 61

            return $this->installToolRedirect();
        }
        // Set up the initial context
        $this->initializeContext();
        return parent::handle($request);
    }

    /**
     * Check if LocalConfiguration.php and PackageStates.php exist

at TYPO3\CMS\Backend\Http\Application->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/AbstractApplication.php line 95

    final public function run(callable $execute = null)
    {
        try {
            $response = $this->handle(
                \TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals()
            );
            if ($execute !== null) {
                call_user_func($execute);
            }

at TYPO3\CMS\Core\Http\AbstractApplication->run()
in /var/www/html/typo3_src-10.3.0/typo3/index.php line 24

// Set up the application for the backend
call_user_func(function () {
    $classLoader = require dirname(__DIR__).'/vendor/autoload.php';
    \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_BE);
    \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Backend\Http\Application::class)->run();
});

at {closure}()
in /var/www/html/typo3_src-10.3.0/typo3/index.php line 25

call_user_func(function () {
    $classLoader = require dirname(__DIR__).'/vendor/autoload.php';
    \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_BE);
    \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Backend\Http\Application::class)->run();
});

Actions #9

Updated by Markus Klein over 4 years ago

It looks like the PHP's prepared statement is lost on the database-side for some reason.
So PHP tries to re-use the prepared statement, but the database has no clue about it anymore.
Could you please try, if you have the same issue, if you use the PDO driver instead?

Actions #10

Updated by Edward A. Gabdullin over 4 years ago


(1/1) PDOException

You cannot serialize or unserialize PDOStatement instances
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Cache/Frontend/VariableFrontend.php line 59

            ];
            GeneralUtility::callUserFunction($_funcRef, $params, $this);
        }
        if (!$this->backend instanceof TransientBackendInterface) {
            $variable = serialize($variable);
        }
        $this->backend->set($entryIdentifier, $variable, $tags, $lifetime);
    }

at PDOStatement->__sleep()
at serialize(object(TYPO3\CMS\Core\Database\Driver\PDOStatement))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Cache/Frontend/VariableFrontend.php line 59

            ];
            GeneralUtility::callUserFunction($_funcRef, $params, $this);
        }
        if (!$this->backend instanceof TransientBackendInterface) {
            $variable = serialize($variable);
        }
        $this->backend->set($entryIdentifier, $variable, $tags, $lifetime);
    }

at TYPO3\CMS\Core\Cache\Frontend\VariableFrontend->set('getPageForRootlineStatement-d41d8cd98f00b204e9800998ecf8427e', object(TYPO3\CMS\Core\Database\Driver\PDOStatement))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Utility/BackendUtility.php line 458

                        $queryBuilder->expr()->eq('uid', $queryBuilder->createPositionalParameter($uid, \PDO::PARAM_INT)),
                        QueryHelper::stripLogicalOperatorPrefix($clause)
                    );
                $statement = $queryBuilder->execute();
                $runtimeCache->set('getPageForRootlineStatement-' . $statementCacheIdent, $statement);
            } else {
                $statement->bindValue(1, (int)$uid);
                $statement->execute();
            }

at TYPO3\CMS\Backend\Utility\BackendUtility::getPageForRootline(1, '', false, array())
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Utility/BackendUtility.php line 350

            $loopCheck = 100;
            $theRowArray = [];
            while ($uid != 0 && $loopCheck) {
                $loopCheck--;
                $row = self::getPageForRootline($uid, $clause, $workspaceOL, $additionalFields);
                if (is_array($row)) {
                    $uid = $row['pid'];
                    $theRowArray[] = $row;
                } else {

at TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine(1)
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Middleware/SiteResolver.php line 62

        if (MathUtility::canBeInterpretedAsInteger($pageId)) {
            $pageId = (int)$pageId;
            $rootLine = null;
            if ($pageId > 0) {
                $rootLine = BackendUtility::BEgetRootLine($pageId);
            }
            $site = $this->siteMatcher->matchByPageId($pageId, $rootLine);
            $request = $request->withAttribute('site', $site);
        }

at TYPO3\CMS\Backend\Middleware\SiteResolver->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Middleware/AdditionalResponseHeaders.php line 39

     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $response = $handler->handle($request);
        foreach ($GLOBALS['TYPO3_CONF_VARS']['BE']['HTTP']['Response']['Headers'] ?? [] as $header) {
            [$headerName, $value] = explode(':', $header, 2);
            $response = $response->withAddedHeader($headerName, trim($value));
        }

at TYPO3\CMS\Backend\Middleware\AdditionalResponseHeaders->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Middleware/OutputCompression.php line 45

        ob_clean();
        // Initialize output compression if configured
        $this->initializeOutputCompression();

        return $handler->handle($request);
    }

    /**
     * Initialize output compression if configured

at TYPO3\CMS\Backend\Middleware\OutputCompression->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php line 71

        // @todo: once this logic is in this method, the redirect URL should be handled as response here
        $GLOBALS['BE_USER']->backendCheckLogin($this->isLoggedInBackendUserRequired($pathToRoute));
        $GLOBALS['LANG'] = LanguageService::createFromUserPreferences($GLOBALS['BE_USER']);

        $response = $handler->handle($request);

        // Additional headers to never cache any PHP request should be sent at any time when
        // accessing the TYPO3 Backend
        return $this->applyHeadersToResponse($response);

at TYPO3\CMS\Backend\Middleware\BackendUserAuthenticator->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Middleware/BackendRouteInitialization.php line 55

        // Add the route path to the request
        $request = $request->withAttribute('routePath', $pathToRoute);

        return $handler->handle($request);
    }
}

at TYPO3\CMS\Backend\Middleware\BackendRouteInitialization->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Middleware/ForcedHttpsBackendRedirector.php line 53

            [$server, $address] = explode('/', $url, 2);
            return new RedirectResponse('https://' . $server . $sslPortSuffix . '/' . $address);
        }

        return $handler->handle($request);
    }
}

at TYPO3\CMS\Backend\Middleware\ForcedHttpsBackendRedirector->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Middleware/LockedBackendGuard.php line 71

            $request->getAttribute('normalizedParams')->getRemoteAddress(),
            trim((string)$GLOBALS['TYPO3_CONF_VARS']['BE']['IPmaskList'])
        );

        return $handler->handle($request);
    }

    /**
     * Check adminOnly configuration variable and redirects to an URL in file typo3conf/LOCK_BACKEND

at TYPO3\CMS\Backend\Middleware\LockedBackendGuard->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Middleware/NormalizedParamsAttribute.php line 43

     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $request = $request->withAttribute('normalizedParams', NormalizedParams::createFromRequest($request));
        return $handler->handle($request);
    }
}

at TYPO3\CMS\Core\Middleware\NormalizedParamsAttribute->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f498ed632b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 76

     * @return ResponseInterface
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        return $this->tip->handle($request);
    }

    /**
     * Seed the middleware stack with the inner request handler

at TYPO3\CMS\Core\Http\MiddlewareDispatcher->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/AbstractApplication.php line 83

     * @return ResponseInterface
     */
    protected function handle(ServerRequestInterface $request): ResponseInterface
    {
        return $this->requestHandler->handle($request);
    }

    /**
     * Set up the application and shut it down afterwards

at TYPO3\CMS\Core\Http\AbstractApplication->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/backend/Classes/Http/Application.php line 61

            return $this->installToolRedirect();
        }
        // Set up the initial context
        $this->initializeContext();
        return parent::handle($request);
    }

    /**
     * Check if LocalConfiguration.php and PackageStates.php exist

at TYPO3\CMS\Backend\Http\Application->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-10.3.0/typo3/sysext/core/Classes/Http/AbstractApplication.php line 95

    final public function run(callable $execute = null)
    {
        try {
            $response = $this->handle(
                \TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals()
            );
            if ($execute !== null) {
                call_user_func($execute);
            }

at TYPO3\CMS\Core\Http\AbstractApplication->run()
in /var/www/html/typo3_src-10.3.0/typo3/index.php line 24

// Set up the application for the backend
call_user_func(function () {
    $classLoader = require dirname(__DIR__).'/vendor/autoload.php';
    \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_BE);
    \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Backend\Http\Application::class)->run();
});

at {closure}()
in /var/www/html/typo3_src-10.3.0/typo3/index.php line 25

call_user_func(function () {
    $classLoader = require dirname(__DIR__).'/vendor/autoload.php';
    \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_BE);
    \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Backend\Http\Application::class)->run();
});

Actions #11

Updated by Markus Klein over 4 years ago

Could you please check your cache configuration for the cache "runtime"?
It MUST use 'backend' => \TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend::class or any backend extending TransientBackendInterface. Obviously it does not in your case.
Consequently it tries to serialize the statement, which fails in case of PDO. Maybe this is also the cause for the error with the mysqli driver.

Actions #12

Updated by Edward A. Gabdullin over 4 years ago

After changing the cache configuration, everything works with the driver "mysqli" and "pdo_mysql".
Thank you very much!

Actions #13

Updated by Timo Poppinga over 4 years ago

for me too, thx

Actions #14

Updated by Georg Ringer over 4 years ago

  • Status changed from Needs Feedback to Closed

Thanks Markus for helping out, closing issue

Actions #15

Updated by Timo Poppinga over 4 years ago

i think it would be good to throw an error if any wrong cache has been chosen

Actions #16

Updated by Markus Klein over 4 years ago

  • Related to Bug #91206: PDOException "You cannot serialize or unserialize PDOStatement instances" in PopulatePageSlugs wizard added
Actions

Also available in: Atom PDF