Error after Install 4.3.3+

Error after Install 4.3.3+

by Ralf Appelt -
Number of replies: 16
Hi there,

i just installed a new, clean, default moodle (Version 4.3.3+ Build: 20240223) on my server. After install i get an Error like: 
"Coding error detected, it must be fixed by a programmer: Invalid property requested, or the property does not has a default value."

Do you have any ideas how I can fix it? I used google and the forums but did not find a solution...

Thanks in advance!
Ralf
Average of ratings: -
In reply to Ralf Appelt

Re: Error after Install 4.3.3+

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Raise the Debugging level to its maximum and get a detailed log trace!
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: Error after Install 4.3.3+

by Ralf Appelt -

Does this help?

Warning: Undefined property: stdClass::$navcourselimit in /www/htdocs/w00c3138/moodle/lib/navigationlib.php on line 3214
Warning: Undefined property: stdClass::$maxbytes in /www/htdocs/w00c3138/moodle/user/editadvanced.php on line 126
Warning: Undefined property: stdClass::$maxbytes in /www/htdocs/w00c3138/moodle/user/editadvanced.php on line 148
Warning: Undefined property: stdClass::$defaultcity in /www/htdocs/w00c3138/moodle/lib/classes/user.php on line 691
Warning: Undefined property: stdClass::$country in /www/htdocs/w00c3138/moodle/lib/classes/user.php on line 692
Warning: Undefined property: stdClass::$calendartype in /www/htdocs/w00c3138/moodle/lib/classes/user.php on line 697
Warning: Undefined property: stdClass::$defaultpreference_mailformat in /www/htdocs/w00c3138/moodle/lib/classes/user.php on line 713
Warning: Undefined property: stdClass::$defaultpreference_maildigest in /www/htdocs/w00c3138/moodle/lib/classes/user.php on line 715
Warning: Undefined property: stdClass::$defaultpreference_maildisplay in /www/htdocs/w00c3138/moodle/lib/classes/user.php on line 717
Warning: Undefined property: stdClass::$defaultpreference_autosubscribe in /www/htdocs/w00c3138/moodle/lib/classes/user.php on line 719
Warning: Undefined property: stdClass::$defaultpreference_trackforums in /www/htdocs/w00c3138/moodle/lib/classes/user.php on line 721
Warning: Undefined property: stdClass::$fullnamedisplay in /www/htdocs/w00c3138/moodle/user/editlib.php on line 430
Warning: Undefined property: stdClass::$fullnamedisplay in /www/htdocs/w00c3138/moodle/user/editlib.php on line 467
Warning: Undefined property: stdClass::$fullnamedisplay in /www/htdocs/w00c3138/moodle/user/editlib.php on line 467
Warning: Undefined property: stdClass::$fullnamedisplay in /www/htdocs/w00c3138/moodle/user/editlib.php on line 467
Warning: Undefined property: stdClass::$fullnamedisplay in /www/htdocs/w00c3138/moodle/user/editlib.php on line 467
Warning: Undefined property: stdClass::$fullnamedisplay in /www/htdocs/w00c3138/moodle/user/editlib.php on line 473
In reply to Ralf Appelt

Re: Error after Install 4.3.3+

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
First suspect is incompatible PHP. What is the PHP version. https://moodledev.io/general/releases/4.3 says you need 8.0 to 8.2.

If you plan to fall back, this chart gives you an overview: http://www.syndrega.ch/blog/#php-and-dbms-compatibility-of-major-moodle-releases.

Generally it is best to provide the information requested in Before you post.. Read this up front.
In reply to Visvanath Ratnaweera

Re: Error after Install 4.3.3+

by Ralf Appelt -
Sorry!
You are completely right.
At the moment I am using PHP 8.0 but also tried 8.1 and 8.2 already.
Upload was via ssh and installing via webbrowser.
DB is a MariaDB 10.6
Server ist a Ubuntu 22 / Apache 2.4
And as I already wrote just a basic standard Install with the english language pack.
In reply to Ralf Appelt

Re: Error after Install 4.3.3+

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Second rather obvious suspects: Purge the browser cache and also purge the Moodle server caches, anything that looks like a temporary store can be deleted, the only critical directory tree is moodledata/filedir/. moodledata/muc/ is notorious.
In reply to Ralf Appelt

Re: Error after Install 4.3.3+

by Ken Task -
Picture of Particularly helpful Moodlers
Were you able to setup the initial admin user with a password via web bowser?

The very last thing a successful install of moodle does is run through everything and set default values.   Did you see that via web browser install?

Since you have ssh and can access your server via command line, you can install via command line - as long as server meets specs for PHP version + extensions and DB version.

Right now, you might be able to discover what's needed via commnand line only scripts in moodlecode/admin/cli/ - If there is a config.php file at code root?

cd /path/to/moodlecode/admin/cli/
php checks.php [ENTER]

That is like the environment check one sees via browser cept web server isn't involved.

Also ...
php -v
php -m
php -i

Was there an admin level user created in DB?

mysql -u [dbuser] -p'[password]'
at mysql> prompt
use moodle; (the DB for moodle)
Then run this query:
select id,auth,username,email from mdl_user;
mdl_ is the prefix and the users are kept in the user table.

'SoS', Ken

In reply to Ralf Appelt

Re: Error after Install 4.3.3+

by Ken Task -
Picture of Particularly helpful Moodlers
Follow up ...
You might review the following to see if server is setup for moodle version:

https://moodledev.io/general/releases/4.3

You might be missing php extensions - not part of php-common - and settings like max_input_vars.

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Error after Install 4.3.3+

by Ralf Appelt -
Everything matches. Thats why me and my hoster are wondering...
In reply to Ralf Appelt

Re: Error after Install 4.3.3+

by Ken Task -
Picture of Particularly helpful Moodlers
Is your DB setup utf8mb4 character set with utf8mb4_unicode_ci collations?
A couple of those error lines of code point to:
'maxbytes'   => $CFG->maxbytes,
Multpile lines point to array for user setup ... beginning with
$city
and then fields ...

$country
$calendartype
$defaultpreference_mailformat
$defaultpreference_autosubscribe
$defaultpreference_trackforums

Are all fields in setup of a user.

In admin/cli/ of code run:
php checks.php
php cfg.php > allvariables.txt
fgrep country allvariables.txt

If those don't show anything or those scripts cannot run, install wasn't finished.

You *might* be able to finish the install, via command line located in code/admin/cli/
php install.php
or install_database.php

'SoS', Ken


In reply to Ralf Appelt

Re: Error after Install 4.3.3+

by Ralf Appelt -
Just to let you know...
I've installed Version 4.1.9+ (Build: 20240223) without any trouble. It is just working fine.
Maybe I am goingt to upgrade soon then.
In reply to Ralf Appelt

Re: Error after Install 4.3.3+

by Ken Task -
Picture of Particularly helpful Moodlers
Did you originally have max_input_vars at defaults?

Please see:
https://moodledev.io/general/releases/4.1

Server requirements
PHP setting max_input_vars is recommended to be >= 5000 for PHP 7.x installations. It's a requirement for PHP 8.x installations. For further details, see Environment - max input vars.
https://docs.moodle.org/en/Environment_-_max_input_vars

https://moodledev.io/general/releases/4.3

Server requirements
PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too. See PHP for details.
Same for max_iput_vars.

Also highly recommend doing the install via command line and git
(easier to update and upgrade later, plus takes web service out of the loop):

https://docs.moodle.org/403/en/Git_for_Administrators

'SoS', Ken

In reply to Ken Task

Re: Error after Install 4.3.3+

by Ralf Appelt -
Thanks Ken,
the server is matching all the requirements, matching also the requirements for the latest version, but that did not work.
I installed via command line - at least the past x times.

Ralf
In reply to Ralf Appelt

Re: Error after Install 4.3.3+

by Ken Task -
Picture of Particularly helpful Moodlers
Then a question ... how did you acquire the code for 4.3?   From downloads at Moodle dot org?  Was it the zip or the tgz?  Did you download and then turned around to upload?
Or did you use git (use of git there is no download and turn-around upload)?

'SoS', Ken


In reply to Ken Task

Re: Error after Install 4.3.3+

by Ralf Appelt -
Meanwhile I tried both. Sownload via git worked well. Installation via command line failed in versions 4.2 and newer.
In reply to Ralf Appelt

Re: Error after Install 4.3.3+

by Ken Task -
Picture of Particularly helpful Moodlers
PHP version?  8.0?

And was the failure the same for version 4.2 and 4.3?
Are we installing in different subdirectories or the same site?
If same site, after a failure, are we dropping the database and re-creating a blank/new DB?
Are we also erasing code directory and moodledata contents?

'SoS', Ken