The issue
Hello devs. Ever since upgrading my server from ubuntu 20.04 to 22.04, and php from 7.4 to 8.1 along with it. After the upgrade, my flarum can't run normally. The issue persistes after I tried composer update. Everytime I open its website it just shows plain text of index.php. There's no log files, and the file permission is properly chmodded to 755 and properly chowned to www-data:www-data. I have no clear idea how to fix this.
Flarum information
My flarum is running upon apache2 and php8.1
ubuntu@VM-0-5-ubuntu:/var/www/html/flarum$ php flarum info
Flarum core 1.5.0
PHP version: 8.1.2-1ubuntu2.8
MySQL version: 5.5.5-10.6.7-MariaDB-2ubuntu1.1
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, intl, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, soap, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlrpc, xmlwriter, xsl, zip, Zend OPcache
+----------------------------------+-------------+--------+
| Flarum Extensions | | |
+----------------------------------+-------------+--------+
| ID | Version | Commit |
+----------------------------------+-------------+--------+
| flarum-flags | v1.5.0 | |
| askvortsov-auto-moderator | v0.1.2 | |
| flarum-tags | v1.5.0 | |
| flarum-sticky | v1.5.0 | |
| afrux-forum-widgets-core | v0.1.7 | |
| nearata-signup-confirm-password | v3.0.1 | |
| flarum-suspend | v1.5.0 | |
| flarum-approval | v1.5.0 | |
| flarum-likes | v1.5.0 | |
| zerosonesfun-member | 1.2 | |
| zerosonesfun-direct-links | 3.1 | |
| zerosonesfun-bbcode-button | 1.1.3 | |
| yannisme-oxotheme | 2.1.5 | |
| v17development-user-badges | v1.1.0 | |
| v17development-seo | v1.8.0 | |
| the-turk-stickiest | 3.0.1 | |
| sycho-move-posts | v0.1.7 | |
| serakoi-flarumstaffbadge | 1.2.1 | |
| nearata-minecraft-avatars | v2.1.0 | |
| nearata-embed-video | v3.2.1 | |
| migratetoflarum-canonical | 1.0.0 | |
| mickmelon-coloured-usernames | 0.1.1 | |
| malago-achievements | 0.5.5 | |
| kyrne-whisper | 0.1.4 | |
| justoverclock-newsfeed | 1.0.1 | |
| justoverclock-hot-discussions | 0.1.2 | |
| justoverclock-header-slideshow | 0.1.1 | |
| justoverclock-emoticonpack | 0.1.2 | |
| justoverclock-dontgoaway | 0.2.5 | |
| ianm-level-ranks | 1.1.0 | |
| glowingblue-password-strength | 3.1.0 | |
| fof-user-bio | 1.1.1 | |
| fof-upload | 1.2.3 | |
| fof-sitemap | 1.0.3 | |
| fof-pretty-mail | 1.1.1 | |
| fof-polls | 1.2.1 | |
| fof-oauth | 1.2.5 | |
| fof-nightmode | 1.5.1 | |
| fof-links | 1.1.2 | |
| fof-ignore-users | 1.1.0 | |
| fof-forum-statistics-widget | 1.0.2 | |
| fof-default-group | 1.1.0 | |
| fof-best-answer | 1.2.4 | |
| fof-ban-ips | 1.0.2 | |
| flarum-subscriptions | v1.5.0 | |
| flarum-statistics | v1.5.1 | |
| flarum-mentions | v1.5.0 | |
| flarum-markdown | v1.5.0 | |
| flarum-lock | v1.5.0 | |
| flarum-lang-english | v1.5.0 | |
| flarum-lang-chinese-simplified | v1.1.1.1220 | |
| flarum-emoji | v1.5.0 | |
| flarum-bbcode | v1.5.0 | |
| datlechin-scroll-buttons | v1.1.0 | |
| clarkwinkelmann-group-list | 1.0.0 | |
| clarkwinkelmann-group-invitation | 1.0.2 | |
| clarkwinkelmann-circle-groups | 1.0.1 | |
| clarkwinkelmann-author-change | 1.0.2 | |
| askvortsov-moderator-warnings | v0.6.1 | |
| askvortsov-markdown-tables | v1.2.1 | |
| antoinefr-online | v1.0.1 | |
| antoinefr-money | v1.2.0 | |
| afrux-top-posters-widget | v0.1.4 | |
| afrux-news-widget | v0.1.1 | |
+----------------------------------+-------------+--------+
Base URL: https://teco.coldregion.top
Installation path: /var/www/html/flarum
Queue driver: sync
Mail driver: smtp
Debug mode: ON
Don't forget to turn off debug mode! It should never be turned on in a production system.