Forums | Mahara Community

Support /
Upgrade to 17.04 fails on Postgres 8


Marcus Leonard's profile picture
Posts: 3

28 June 2017, 5:02 PM

Upgrading from 15.10.1 to mahara-17.04.2.

Servers are RHEL5/6. PG8 is standard issue on Red Hat Enterprise 6, and Mahara sys reqs still say it's supported.

Running upgrade.php, auth.webservice step results in "Failed to upgrade."

Apache error Log (xxxx = redacted):
----------------------------------
xxxx [DBG] da (lib/dml.php:157) postgres8 error: [-1: ERROR: function left(character varying, integer) does not exist at character 73, referer: xxxx
xxxx [DBG] da (lib/dml.php:157) HINT: No function matches the given name and argument types. You might need to add explicit type casts.] in adodb_throw(UPDATE "external_functions", referer: xxxx
----------------------------------

I've filed a bug (#1700893), but just wondering if anyone has come across the same problem and if there's a workaround to get things moving.

 

Marcus Leonard's profile picture
Posts: 3

28 June 2017, 5:21 PM

More info if it helps.

Looks like it's here:

auth/webservice/db/upgrade.php:518


execute_sql(
            "UPDATE {external_functions}
            SET
                component = LEFT(
                    component,
                    LENGTH(component) - {$length}
                )
            WHERE
                component <> 'webservice'
                AND RIGHT(
                    component,
                    {$length}
                ) = '{$oldtail}'
            "
        );


Apparently functions left() and right() appeared in pg 9.3. I've got 8.4.

 

Kristina Hoeppner's profile picture
Posts: 3590

29 June 2017, 3:13 PM

Hello Marcus,

Mahara 17.04 requires at minimum Postgres 9.1. We noticed the lack of update in the Readme file recently and amended it at https://git.mahara.org/mahara/mahara/commit/f53554464d5592c4e747e0634ee9f2a29c0a5099 (not yet released).

Upgrading to a later RHEL would also be beneficial for the PHP version as PHP 5.3 is not supported anymore and prevents an upgrade to Mahara 17.04.

Cheers

Kristina

 

Marcus Leonard's profile picture
Posts: 3

29 June 2017, 4:44 PM

Hi Kristina,

Ouch. Ok, thanks for the update.

PHP isn't a problem, we already have 5.6 on the server. We're planning to upgrade to RHEL7 relatively soon, so I guess we'll just try to bring that forward.

Cheers,

Marcus

4 results