xenocrat / chyrp-lite

An ultra-lightweight blogging engine, written in PHP.
https://chyrplite.net/
BSD 3-Clause "New" or "Revised" License
402 stars 42 forks source link

Upgrade error Release v2022.02 #154

Closed Torsten-K closed 2 years ago

Torsten-K commented 2 years ago

1071 Specified key was too long; max key length is 1000 bytes

Hi,

upgrade failed because of the database error shown above. Something like this did not happen ever before, so I am a bit helpless now. My workaround was to comment out lines 423 and 424 in upgrade.php, so I have a working installation again now. Nevertheless, I think there should be a fix. Thanks in advance.

Cheers, Torsten

xenocrat commented 2 years ago

Hello there,

Lines 423 and 424 upgrade MySQL tables and columns to a character set and collation that uses utf8mb4. I don’t know which keys could be causing the problem because key lengths for core and all modules should all be well under 1000 bytes. To resolve the problem, you can try to do the upgrade manually using phpMyAdmin:

  1. Log in to phpMyAdmin.
  2. Select the database you want to modify from the left panel.
  3. Click the Operations tab in the top menu.
  4. Scroll down to the Collation section, choose any “utf8mb4_” collation.
  5. Select the options to also convert tables and columns.
  6. Click Go.

If you see errors on a particular table, let me know and I will investigate further.

Torsten-K commented 2 years ago

Thanks, manipulating the database helped so far. If I should run into the described problem again in a future release, I will report again.