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

Fresh installation of 19.10.1 fails

Thomas Kollewe's profile picture
Thomas Kollewe
Posts: 13
18 February 2020, 23:16

Hi,

I'm trying to install Mahara but it already fails at the first point with the message "Upgrade failed".

I then tried the CLI installer and this gives me the following message:

Fatal error: Can't use function return value in write context in /home/staff_homes/path_to/my_directory/public/mahara/lib/mahara.php on line 166

I'm trying to install on a server from my university with

  • PHP 7.2.27
  • MySQL 8.0.18
  • Apache/2.2.15 (Red Hat) DAV/2 mod_fcgid/2.3.9 mod_fastcgi/2.4.6 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips mod_perl/2.0.4 Perl/v5.10.1
  • Client Version: libmysql - 5.1.73

Although I edited the config.php to write and show log there's no additional log file created.

Thanks in advance!

Thomas

Robert Lyon's profile picture
Robert Lyon
Posts: 822
19 February 2020, 10:26

Re: Fresh installation of 19.10.1 fails

Hi Thomas,

By the looks of things you will need to change the following in your code:

https://reviews.mahara.org/#/c/10765/1/htdocs/lib/mahara.php

Let me know if that helps

Cheers

Robert

 

Thomas Kollewe's profile picture
Thomas Kollewe
Posts: 13
19 February 2020, 22:05

Re: Fresh installation of 19.10.1 fails

Hi Robert,

 

thanks for your help. The problem for line 166 seems to be solved. Unfortunately now line 5693 causes the same error:

Fatal error: Can't use function return value in write context in /home/staff_homes/path_to/my_dir/public/mahara/lib/mahara.php on line 5693

 

$ sed '5693q;d' lib/mahara.php
$policy = !empty(get_config('passwordpolicy')) ? get_config('passwordpolicy') : '8_ulns';

 

Kind regards,

Thomas

 

 

Robert Lyon's profile picture
Robert Lyon
Posts: 822
20 February 2020, 8:31

Re: Fresh installation of 19.10.1 fails

Hi Thomas,

Thank you for letting me know.

I've updated the patch https://reviews.mahara.org/#/c/10765/ to fix up other places in the code where this error could occur when trying to read a config value and check it is empty at the same time.

It includes a fix for the line you mentioned

Cheers

Robert

 

Thomas Kollewe's profile picture
Thomas Kollewe
Posts: 13
20 February 2020, 22:08

Re: Fresh installation of 19.10.1 fails

Hi Robert,

Thank you for taking time and your work.

Unfortunately there's still a problem in 

/auth/user.php on line 1361

$ sed '1361q;d' auth/user.php
$institutions = !empty($this->get('institutions')) ? array_keys($this->get('institutions')) : array('mahara');

 

Kind regards,

Thomas

 

 

Thomas Kollewe's profile picture
Thomas Kollewe
Posts: 13
26 February 2020, 22:55

Re: Fresh installation of 19.10.1 fails

Hi,

are the problems, that I encounter caused by the shared server of my university or are they just within Mahara?

 

Kind regards,

Thomas

 

Robert Lyon's profile picture
Robert Lyon
Posts: 822
27 February 2020, 9:10

Re: Fresh installation of 19.10.1 fails

Hi Thomas,

The errors that you experienced used to happen for PHP older than version 5.5 - see https://www.php.net/manual/en/function.empty.php

And in most of the Mahara code we had adjusted things so they worked with PHP < 5.5 back in the day.

But recently that error was not occurring as PHP empty() function could handle expressions, rather than only variables. 

So some recent code was not written the old way. In the patch I created it does the code in the old way. Slightly more long-winded but otherwise doing the exact same thing.

You say your PHP version is 7.2 - can I get you to double check by going to your Mahara site and looking in:

Admin Home (wrench icon top right) -> Register and expand the 'Data included' area and find the 'phpversion' value. This will tell you what Mahara believes it is using- is that still 7.2?

Cheers

Robert

Thomas Kollewe's profile picture
Thomas Kollewe
Posts: 13
27 February 2020, 20:08

Re: Fresh installation of 19.10.1 fails

Hi Robert,

Unfortunately I can't check the PHP Version in Mahara because it still fails to install due to the error I described in Post #7.

Here is the list of the installed modules in the server that says it is PHP 7.2.28 :

http://modules.cgi-host2.rz.uni-frankfurt.de/

 

Kind regards 

Thomas

Thomas Kollewe's profile picture
Thomas Kollewe
Posts: 13
04 March 2020, 3:41

Re: Fresh installation of 19.10.1 fails

Hi Robert,

is there any chance that my problem in auth/user.php can be solved?

 

$ sed '1361q;d' auth/user.php
$institutions = !empty($this->get('institutions')) ? array_keys($this->get('institutions')) : array('mahara');


Thanks,

Thomas

Robert Lyon's profile picture
Robert Lyon
Posts: 822
04 March 2020, 11:19

Re: Fresh installation of 19.10.1 fails

Hi Thomas,

I've updated this patch https://reviews.mahara.org/#/c/10765/

Try it out and let me know how it goes

Cheers

Robert