PHP Fatal error: During inheritance of IteratorAggregate: Uncaught ArgumentCountError:

PHP Fatal error: During inheritance of IteratorAggregate: Uncaught ArgumentCountError:

by Declan Persram -
Number of replies: 1

Hi. I am new to running my own Moodle installation, but I am neither new to Moodle nor Linux. However, I am completely new to PHP and Apache.

I have a fresh Ubuntu 20.04 server installed, and I followed all the directions in the step-by-step guide: docs.moodle.org/400/en/Step-by-step_Installation_Guide_for_Ubuntu

I am using PHP 8.1.7, not 7.4 as listed in the above. 

declan@moodle-madness:~$ php --version
PHP 8.1.7 (cli) (built: Jun 10 2022 12:22:48) (NTS)

I installed Moodle version 3.9.14+ (Build: 20220617)

After getting to the end of the setup guide, I tried to access the moodle page from another machine on the same network, and I arrived at a blank webpage with no message. I get the following error message in the server log file:

[Thu Jun 23 10:41:33.548520 2022] [php:error] [pid 1244] [client 192.168.1.4:38522] PHP Fatal error:  During inheritance of IteratorAggregate: Uncaught ArgumentCountError: Too few arguments to function default_error_handler(), 4 passed in /var/www/html/moodle/lib/navigationlib.php on line 897 and exactly 5 expected in /var/www/html/moodle/lib/setuplib.php:425\nStack trace:\n#0 /var/www/html/moodle/lib/navigationlib.php(897): default_error_handler()\n#1 /var/www/html/moodle/lib/setup.php(604): require_once('...')\n#2 /var/www/html/moodle/config.php(1080): require_once('...')\n#3 /var/www/html/moodle/index.php(30): require_once('...')\n#4 {main} in /var/www/html/moodle/lib/navigationlib.php on line 897

Any thoughts? Thanks in advance!


Average of ratings: -