Installing Gibbon v30 - Error After Step 2

Hi @sandra

I’m running into an issue that I haven’t seen anyone else report, so I was a little hesitant to bring it up. My Gibbon installations have been very consistent over the past five years—about 99% successful—across dozens of installs in both Testing and Production. This includes installing the cutting-edge v30 code before the official release on November 20th.

However, this is my first time installing the official v30 release, and I’m hitting the error shown below immediately after Step 2. I tried the process a couple of times with the same result. To double-check, I went back and installed v29, and that worked without issues.

Thanks!

Not sure if this is helpful:

17:58:54 [error] 2852556#2852556: *620611 FastCGI sent in stderr: “PHP message: Installer: Step 1: assigning random guid: ‘5cpbrhvw6-…’” while reading response header from upstream, client: 98.xx.xx.xx, server: phpstack… apps.com, request: “GET /installer/install.php HTTP/1.1”, upstream: “fastcgi://unix:/var/run/fpm-mrguyswayv.sock:”, host: “phpstack… apps.com
17:58:57 [error] 2852556#2852556: *620611 FastCGI sent in stderr: “PHP message: Installer: Step 1: assigning random guid: ‘h3nnzcvy…’” while reading response header from upstream, client: 67.xx.xx.xx, server: phpstack… apps.com, request: “GET /installer/install.php HTTP/1.1”, upstream: “fastcgi://unix:/var/run/fpm-mrguyswayv.sock:”, host: “phpstack… apps.com”, referrer: “https://www.google.com/
17:59:01 [error] 2852556#2852556: *620611 FastCGI sent in stderr: “PHP message: Installer: Step 1: Using guid from $_COOKIE: ‘5cpbrhvw6-…’” while reading response header from upstream, client: 98.xx.xx.xx, server: phpstack… apps.com, request: “POST /installer/install.php?step=1 HTTP/1.1”, upstream: “fastcgi://unix:/var/run/fpm-mrguyswayv.sock:”, host: “phpstack… apps.com”, referrer: “https://phpstackapps.com/installer/install.php
17:59:01 [error] 2852556#2852556: *620611 FastCGI sent in stderr: “PHP message: Installer: Step 2: Using guid from $_COOKIE: ‘5cpbrhvw6-…’” while reading response header from upstream, client: 98.xx.xx.xx, server: phpstack… apps.com, request: “GET /installer/install.php?step=2 HTTP/1.1”, upstream: “fastcgi://unix:/var/run/fpm-mrguyswayv.sock:”, host: “phpstack… apps.com”, referrer: “https://phpstackapps.com/installer/install.php
17:59:34 [error] 2852556#2852556: *620611 FastCGI sent in stderr: “PHP message: Installer: Step 2: Using guid from $_COOKIE: ‘5cpbrhvw6-…’” while reading response header from upstream, client: 98.xx.xx.xx, server: phpstack… apps.com, request: “POST /installer/install.php?step=2 HTTP/1.1”, upstream: “fastcgi://unix:/var/run/fpm-mrguyswayv.sock:”, host: “phpstack… apps.com”, referrer: “https://phpstackapps.com/installer/install.php?step=2

Hi @tiekubd
Thanks for your question. That is strange as no one else has yet reported that. I am wondering if you can maybe go to your current gibbon folder and remove the config.php file and try to install it again? Do let me know if that works. Thanks!

Hi @Ali

This appears to be similar to this issue raised here on this thread.

The original poster has not reverted to indicate if the problem was resolved.

Regards

NGN

@ngn @Ali @sandra

Looks like I may have seen this post before but didn’t pay close attention, so I was wrong thinking no one else hit this error after installation step 2.

Hopefully we can figure out what changed and what’s causing it. Does the installation script need an update, or is there something I should adjust in my system/server settings?

Thanks.

Hi @tiekubd and @ngn for bringing this to our attention.

We hadn’t seen this in any of our manual or automated testing for v30. However, I wonder if it may be system resource related, such as PHP hitting a memory or timeout limit. The latest version did add two new core modules, which would have increased the size of the gibbon.sql file, and may have just pushed it over the limit for some systems.

Tieku, as a short-term solution, are you able to test increasing the memory_limit and max_execution_time to see if this resolves the issue? (be sure to restart afterwards for changes to take effect). Otherwise, another option could be to look at MySQL’s memory limit as well.

Long term, I will see if it’s possible for us to override the memory limit during installation, or possibly split the gibbon.sql file into separate files, installing one at a time.

Hope this helps!

Sandra,

I might have found the problem with a bit of troubleshooting and help from ChatGPT.

I tried importing the db manually into my php app on my cloud server:

Import – -------------------------------------------------------- – – Table structure for table gibbonPersonPhoto – CREATE TABLE gibbonPersonPhoto ( gibbonPersonPhotoID int(12) UNSIGNED ZEROFILL NOT NULL, gibbonSchoolYearID int(3) UNSIGNED ZEROFILL NOT NULL, gibbonPersonID int(10) UNSIGNED ZEROFILL NOT NULL, personImage varchar(255) NOT NULL, gibbonPersonIDCreated int DEFAULT NULL, timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci Error in query (1273): Unknown collation: ‘utf8mb4_0900_ai_ci’ 156 queries executed OK. (0.955 s)

ChatGPT said:

Perfect, that’s exactly the error we needed :+1:

You’ve just proved the root cause:

CREATE TABLE gibbonPersonPhoto (

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci

Error in query (1273): Unknown collation: ‘utf8mb4_0900_ai_ci’

1. What’s actually going wrong

  • utf8mb4_0900_ai_ci is a MySQL 8-only collation (it became the default coll. in MySQL 8).
  • MariaDB 10.11 does not implement that collation name, so it throws ERROR 1273: Unknown collation ‘utf8mb4_0900_ai_ci’.

So:

  • v30’s gibbon.sql was generated assuming MySQL 8 (and uses utf8mb4_0900_ai_ci).
  • You’re installing on MariaDB 10.11.15, which can do utf8mb4, but not that specific collation.
  • The installer runs fine for the first 156 queries, then hits this table (first one with that explicit collation) and dies. That’s why step 2 “populate database” fails.

The on-screen messages:

Errors occurred in populating the database …
Installation failed: The file config.php already exists …

are just the installer reacting to that failed import.


2. Two ways to fix it

You now have two realistic options:

Option A (cleanest long-term): install v30 on MySQL 8+ instead of MariaDB

  • This lines up with Gibbon’s v30 requirement of MySQL 8.0+.
  • On a MySQL 8 server, utf8mb4_0900_ai_ci is valid and everything “just works”.

(My host only supports MariaDB for PHP applications.)

Option B (practical on your current server): patch gibbon.sql (and demo SQL) for MariaDB

Since MariaDB doesn’t know utf8mb4_0900_ai_ci, the standard workaround is to search-and-replace that collation with one MariaDB supports, like utf8mb4_unicode_ci or utf8mb4_general_ci. This is the same trick people use when importing MySQL-8 dumps into MariaDB.

So I did a search and replace on utf8mb4_0900_ai_ci.

The manual db import did not fail this time, nor did the GUI installation using the updated gibbon.sql. v30 installation successful.

:sweat_smile:

Thanks

1 Like

Excellent troubleshooting @tiekubd

I can confirm the problem lies with the gibbonPersonPhoto table. Removing the collation as you have indicated allows the database to be imported without issue. It also happens that gibbonPersonPhoto table is table number 129 in the import order, that’s why the partial import would only have 128 tables.

Regards

NGN

1 Like

Thank you @tiekubd for digging in and discovering the cause, and @ngn for confirming. We do try and keep things compatible for MariaDB, but must not have it running on any of our test servers, so this issue snuck past our testing into release. I aim to add a default collation for new tables in CHANGEDB, but it looks like this table didn’t have one, so the gibbon.sql file ended up inheriting the default from MySQL8, which was unintentional.

There have been a couple minor bugs in v30, including this one, so I will plan to bundle up these fixes into a v30.0.01 minor update and release it within the next week. Please let me know if you spot any other issues so we can be sure to patch them before this release. Thanks!

Hi Sandra,

This is not something to be patched, but I wanted to see whether you could still “add example imports for each of the new custom field contexts.”

Thanks.

I don’t know this is helpful or not, but before I try to install, I make a minor changes in gibbon.sql file.

in “CREATE TABLE gibbonPersonPhoto" I change COLLATE=utf8mb4_0900_ai_ci to COLLATE=utf8mb4_unicode_ci.

and I don’t know the effect of this change, but the installation went through successfully.

I also don’t know what happens when we update from v29 to v30. I still haven’t done that.

regards,

Imam Nursianto

Thanks @imamnurs, good to hear you have a solution, and this fix will be part of the v30.0.01 patch. This issue shouldn’t affect updates, as the current code causes the new table to default to the current MySQL default collation. However, the gibbon.sql file is pre-generated, so it accidentally inherited a different default collation from the server it was generated on (utf8mb4_0900_ai_ci), which was the source of this issue.