Error on fresh installation

Error on fresh installation

Thoriq Adillah -
回帖数: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
回复Thoriq Adillah

Re: Error on fresh installation

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 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.
回复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
附件 WhatsApp Image 2023-06-05 at 20.51.31.jpeg
回复Thoriq Adillah

Re: Error on fresh installation

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像
I have no idea 伤心

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).