Typo3 Fatal error: Error\Exception: PHP Warning: gzuncompress()

Viewed 1268

I have updated my Typo3 ddev installation and i get this error:

Fatal error: Uncaught TYPO3\CMS\Core\Error\Exception: PHP Warning: gzuncompress(): data error in /var/www/html/public/typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php line 158 in /var/www/html/public/typo3/sysext/core/Classes/Error/ErrorHandler.php:130 Stack trace: #0 [internal function]: TYPO3\CMS\Core\Error\ErrorHandler->handleError(2, 'gzuncompress():...', '/var/www/html/p...', 158, Array) #1 /var/www/html/public/typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php(158): gzuncompress('a:1:{i:0;a:25:{...') #2 /var/www/html/public/typo3/sysext/core/Classes/Cache/Frontend/VariableFrontend.php(81): TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend->get('1__0_-99') #3 /var/www/html/public/typo3/sysext/core/Classes/Utility/RootlineUtility.php(211): TYPO3\CMS\Core\Cache\Frontend\VariableFrontend->get('1__0_-99') #4 /var/www/html/public/typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php(68): TYPO3\CMS\Core\Utility\RootlineUtility->get() #5 /var/www/html/public/typo3/sysext/ex in /var/www/html/public/typo3/sysext/core/Classes/Error/ErrorHandler.php on line 130

I don't understand what i'm missing. I have did composer update, didn't solve it. Even installtool say "no site configuration" "page are inaccessible" Typo3 10.4 PHP 7

3 Answers

This may happen if you have utf8mb4 configured in TYPO3 configuration for the database but it is an old database with utf8 encoding.

Solution:

  1. Dump the database
  2. Drop the database
  3. Create the database
  4. Import the dump

You may want to check the dump that it does not force old utf8 encoding.

I have find the solution, i was had a bad cache configuration in the localconf file, so i deleted all backend cache configuration:

[
        'cacheConfigurations' => [
            'hash' => [
                'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
            ],
            'imagesizes' => [
                'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
                'options' => [
                    'compression' => 1,
                ],
            ],
            'pages' => [
                'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
                'options' => [
                    'compression' => 1,
                ],
            ],
            'pagesection' => [
                'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
                'options' => [
                    'compression' => 1,
                ],
            ],
            'rootline' => [
                'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
                'options' => [
                    'compression' => 1,
                ],
            ],
        ],
    ],

So i guess that the caching method that i was using it wasn't working... maybe from my server side, i hope i find a solution for caching.

I've had a similar problem and truncating all cache tables on the database solved it for me.

Related