After updating DDEV to 1.19 I get following error after backend login in TYPO3 11.5.8:
PHP Warning: gzuncompress(): need dictionary in
/var/www/html/public/typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php
line 158
I already tried a lot of things:
I have tried all officially PHP versions which are possible with DDEV.
I have downgraded doctrine/dbal 2.13.8, 2.13.7, 2.13.6, …
I have downgraded MariaDB 10.3 to 10.2
Nothing works. So it needs a deeper view of the problem:
In Typo3DatabaseBackend.php
at line 158 I have added
$tmp = gzuncompress($data);
With help of xdebug I can see that uncompress works without any problems. So, IMO it can’t be a zlib problem.
As next step I have converted the compressed $data with bin2hex($data)
into $tmp and in my database I have tried to HEX the value, too:
SELECT uid, CONVERT(content USING utf8) FROM cache_rootline WHERE uid = 1;
Interesting point:
- Before:
789c4d904172c3200
- In DB:
0x783f4d3f41723f200
- Select:
783f4d3f41723f200
Nearly each 2nd byte is correct, but the other bytes are totally wrong.
I have exported my MariaDB data and switched to MySQL 8.0 and imported the data again. Because of some utf8mb4_unicode_ci incompatibilities I have recreated all cache tables with help of Installtool of TYPO3.
After login to TYPO3 backend I got following error:
General error: 3988 Conversion from collation utf8_general_ci into utf8mb4_unicode_ci impossible
I have searched full TYPO3 project, but I can’t find utf8_general_ci
anywhere.
Do you have any idea, what could be wrong?
Thank you for your help.
Stefan
2
Answers
On new DDEV project four LocalConfiguration looks something like that:
and DDEV creates following to your AdditionalConfiguration.php
Maybe you have added following to your configuration to create new tables with a specific collation:
Do you see the problem? The
charset
option of LocalConfiguration.php was NOT overwritten in your AdditionalConfiguration. So, you have a charset miss-match in your configuration. Please keep them in sync.Either set collation back to utf8_unicode_ci or add:
in AdditionalConfiguration.php
Have fun with TYPO3
Stefan
For me the easiest way was to replace the pdo_mysql driver with mysqli.
Because I’m only using MariaDB and my database was utf8_general_ci encoded, this was the easiest fix/help.