Error on application setup

Ubuntu 20.04 LAMP APACHE2
InvoicePlane V 1.6.0

Note this is my first time using a CodeIgniter Project. Any insight on how to resolve would be very helpful.

I rec’d after clicking Setup on the first page.

An uncaught Exception was encountered

Type: Error

Message: Call to undefined function each()

Filename: /var/www/html/invoiceplane/application/third_party/MX/Modules.php

Line Number: 84


File: /var/www/html/invoiceplane/application/third_party/MX/Loader.php
Line: 286
Function: load

File: /var/www/html/invoiceplane/application/modules/setup/controllers/Setup.php
Line: 46
Function: module

File: /var/www/html/invoiceplane/index.php
Line: 325
Function: require_once

Call to undefined function each

That is weird.
In the Ubuntu terminal, can you type:
php -v.
Very interested in the outcone

root@localhost:~# php -v
PHP 8.0.28 (cli) (built: Feb 14 2023 18:32:57) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.28, Copyright (c) Zend Technologies
with Zend OPcache v8.0.28, Copyright (c), by Zend Technologies


Really, really weird.

  • did you download the .zip file from the website or did you clone the repository fron guthub?

I would do couple of things:

  • unrelated, but start using PHP 8.1
  • remove vendor directory
  • remove composer.lock
  • adjust composer.json, it shows sonething about PHP 8.1 at the moment
  • composer install

When you run composer install again it brings in the new vendor directory and it shouldn’t have an each function in there, at all