Error on fresh installation

Error on fresh installation

Thoriq Adillah -
Vastausten määrä: 4
I have issue after fresh moodle installation that says

```
Exception - Typed property DOMAttr::$name must not be accessed before initialization
Debug info:
Error code: generalexceptionmessage
Stack trace:

    line 267 of /lib/htmlpurifier/HTMLPurifier/Lexer/DOMLex.php: Error thrown
    line 222 of /lib/htmlpurifier/HTMLPurifier/Lexer/DOMLex.php: call to HTMLPurifier_Lexer_DOMLex->transformAttrToAssoc()
    line 118 of /lib/htmlpurifier/HTMLPurifier/Lexer/DOMLex.php: call to HTMLPurifier_Lexer_DOMLex->createStartNode()
    line 90 of /lib/htmlpurifier/HTMLPurifier/Lexer/DOMLex.php: call to HTMLPurifier_Lexer_DOMLex->tokenizeDOM()
    line 213 of /lib/htmlpurifier/HTMLPurifier.php: call to HTMLPurifier_Lexer_DOMLex->tokenizeHTML()
    line 1971 of /lib/weblib.php: call to HTMLPurifier->purify()
    line 1759 of /lib/weblib.php: call to purify_html()
    line 3010 of /lib/weblib.php: call to clean_text()
    line 750 of /admin/index.php: call to redirect()
```
Everything was basically almost copy and paste with slight modification from this link https://docs.moodle.org/402/en/Step-by-step_Installation_Guide_for_Ubuntu

After all requirement are met on installation screen (except https), I pressed continue and left it, and after I came back, it was the error that greeted me

How do i resolve this issue? Thank you in advance

My setup
- OS: Fedora 37
- PHP 8.1.19
- Web server: httpd
- Database: postgresql 14.3
- Moodle: 4.2
Arviointien keskiarvo: -
Vastaus Thoriq Adillah

Re: Error on fresh installation

Howard Miller -
Kuva: Core developers Kuva: Documentation writers Kuva: Particularly helpful Moodlers Kuva: Peer reviewers Kuva: Plugin developers
If you just re-run the installation from where it stopped (just go to Moodle's home page URL), do you get the same issue?

It seems to be failing where Moodle is about to create the admin user.
Vastaus Howard Miller

Re: Error on fresh installation

Thoriq Adillah -
Yes sir, the error still persist. Basically, it was just the error and continue button. When the button is clicked, it just refresh and won't go anywhere
The error above is because I add some lines on config.php to force the debug info
Liitetiedosto WhatsApp Image 2023-06-05 at 20.51.31.jpeg
Vastaus Thoriq Adillah

Re: Error on fresh installation

Howard Miller -
Kuva: Core developers Kuva: Documentation writers Kuva: Particularly helpful Moodlers Kuva: Peer reviewers Kuva: Plugin developers
I have no idea surullinen

I would ask you to check very carefully that you have all the versions of software you think you do. Especially PHP (note, 'php -v' at the command line tells you nothing).
Vastaus Howard Miller

Re: Error on fresh installation

Bruno Baudry -
Kuva: Core developers
For those that would stumble upon that. Upgrading to php 8.2+ did the trick for me.