Illustration of connected portfolio elements

Portfolios for your
learning community

Try out Mahara

Create portfolios

Using Mahara, students and staff create their personal learning stories by uploading evidence of activities they have participated in, and embedding publicly accessible content they have previously put online. They can write reflections on their experiences that frame this evidence, map it to competencies or registration requirements, and provide necessary context.

Mahara can be used for many different portfolio purposes, such as study, professional development, work-integrated learning, assessment, showcase and presentation, and employability.

Learn about the portfolio options

Illustration of a person with their portfolio
Illustration of a paper airplane representing sharing

Share work

Mahara allows portfolios to be shared flexibly with one person, a specific group of people, or the entire world. Access can be further restricted to a particular time frame or just within an assessment task.

Find out about sharing portfolios

Engage with others

Mahara makes it easy to comment and give feedback. Portfolios can also be submitted to learning management systems via LTI (Learning Tools Interoperability) for marking.

Groups in Mahara allow people to create portfolios collaboratively and engage in forum discussions.

Learn about collaborating in Mahara

Illustration of a group of people collaborating
Illustration of a podcast logo

Listen to portfolio stories

In our podcast 'Create. Share. Engage.' portfolio practitioners, researchers, learning designers, and portfolio authors share their journey. Learn how they navigate the many different facets of portfolios in general, and Mahara specifically.

Listen on the podcast website or in your favourite app

Mahara Community

1071: Specified key was too long (utf8mb4 and VARCHAR(255) Primary Key)

Guillaume Nerzic's profile picture
Guillaume Nerzic
Posts: 12
08 February 2021, 7:58

Hello

I'm trying to install Mahara 20.10.0 (2020092107)  on a shared hosting environement. This enviromnent does not support the latest version of PostgreSQL, so I'm having to use MySql instead.

I've created the database using UFT8MB4 as directed by the Mahara installation scripts.

I'm getting the following error in the "Update Core" step:

(lib/dml.php:181) mysqli error: [1071: Specified key was too long; max key length is 767 bytes] in EXECUTE("CREATE TABLE config (
    field VARCHAR(255) NOT NULL,
    value LONGTEXT,
CONSTRAINT  PRIMARY KEY (field)
)ENGINE=innodb")Command was: CREATE TABLE config (
    field VARCHAR(255) NOT NULL,
    value LONGTEXT,
CONSTRAINT  PRIMARY KEY (field)
)ENGINE=innodb

I'm getting similar error for table which are attempting to use BIGINT as the primary key.

Looking this up, it seems that I would need to set an innodb system variable to innodb_large_prefix = true to get around this, but I don't think I have permission to do that in the shared environment. 

Any suggestions?

Guillaume

Robert Lyon's profile picture
Robert Lyon
Posts: 822
09 February 2021, 9:55

Re: 1071: Specified key was too long (utf8mb4 and VARCHAR(255) Primary Key)

Hi Guillaume,

Ok the issue sounds like what is mentioned here
https://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes

So I'm assuming the MySql is version 5.6 - because the 'field' column has 255 chars it needs 255 * 4 = 1080 bytes needed 

Is it possible for you to upgrade to a newer version? I see MySql 5.7 allows 3072 bytes

Cheers

Robert

 

Guillaume Nerzic's profile picture
Guillaume Nerzic
Posts: 12
09 February 2021, 11:17

Re: 1071: Specified key was too long (utf8mb4 and VARCHAR(255) Primary Key)

Hi Robert.

Let me check with the hosting company to see if they plan to upgrade.

I'll let you know if that solves it.

Thanks again for your prompt and informed assistance.

GUillaume

Kristina Hoeppner's profile picture
Kristina Hoeppner
Posts: 5137
09 February 2021, 22:25

Re: 1071: Specified key was too long (utf8mb4 and VARCHAR(255) Primary Key)

Hi Guillaume,

What do you mean with 'latest Postgres'? You can still use Mahara with the older Postgres 9.4+.

Cheers

Kristina

Guillaume Nerzic's profile picture
Guillaume Nerzic
Posts: 12
10 February 2021, 11:03

Re: 1071: Specified key was too long (utf8mb4 and VARCHAR(255) Primary Key)

Hi Kristina,

Sorry, I should have explained, my hosted environment is a little bit lagging, we're not on PostGres 9.4 yet, so I get the following message:

Your database server version is not new enough to successfully run Mahara. Your server is PostgreSQL 8.4.20, but Mahara requires at least version 9.3.

But I'm told that I'm due to be upgraded soon, so I'll be patient... #twiddlingthumbs

 

Guillaume

Kristina Hoeppner's profile picture
Kristina Hoeppner
Posts: 5137
12 February 2021, 9:31

Re: 1071: Specified key was too long (utf8mb4 and VARCHAR(255) Primary Key)

Hi Guillaume,

I hope you don't have to wait too long.

Cheers

Kristina