[Solved] Mythweb broken on Ubuntu 22.04

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
Maven
Newcomer
Posts: 5
Joined: Sun Jan 01, 2017 10:18 pm
United States of America

[Solved] Mythweb broken on Ubuntu 22.04

Post by Maven »

Fresh install of Ubuntu 22.04. I then installed a master backend via Mythbuntu Control Panel and added Mythweb, but I get errors trying to access Mythweb:
Fatal error: Uncaught mysqli_sql_exception: Table 'mythconverg.music_songs' doesn't exist in /usr/share/mythtv/mythweb/classes/Database/Query/mysqlicompat.php:68 Stack trace: #0 /usr/share/mythtv/mythweb/classes/Database/Query/mysqlicompat.php(68): mysqli_query() #1 /usr/share/mythtv/mythweb/classes/Database.php(263): Database_Query_mysqlicompat->execute() #2 /usr/share/mythtv/mythweb/classes/Database.php(326): Database->query() #3 /usr/share/mythtv/mythweb/modules/music/init.php(15): Database->query_col() #4 /usr/share/mythtv/mythweb/classes/Modules.php(30): require_once('...') #5 /usr/share/mythtv/mythweb/classes/Modules.php(50): Modules::load() #6 /usr/share/mythtv/mythweb/mythweb.php(30): Modules::getModule() #7 {main} thrown in /usr/share/mythtv/mythweb/classes/Database/Query/mysqlicompat.php on line 68
On the wiki, I see this at the bottom of the Mythweb entry:
Mythweb and PHP 8.0
Some distributions may distribute old code incompatible with PHP 8.0. The Ubuntu mythweb package (31.0+fixes.20200323) is broken with regards to PHP 8+. For Ubuntu and derivative distributions the mythweb package should be installed so mythweb might be activated 'in the Ubuntu way'. The code from a git clone should then be pulled (and perhaps placed in an alternate location, such as /var/www/html/ and configuration files updated).

Mythweb verified to work with mythweb code from a git clone on:
Ubuntu 21.10
Fedora 35
That seems relevant, but as a novice I don't know how to translate that into a step-by-step solution. Can anyone help?
Last edited by Maven on Sun Jun 19, 2022 12:56 am, edited 1 time in total.
User avatar
heyted
Senior
Posts: 301
Joined: Sun Jun 08, 2014 2:14 am
Location: South Florida
Contact:
United States of America

Re: Mythweb broken on Ubuntu 22.04

Post by heyted »

Hi. Take a look at this thread from the mailing list. Try installing the MythMusic plugin. MythWeb works for me after installing that plugin, including the channels page.
Ted | My blog
Maven
Newcomer
Posts: 5
Joined: Sun Jan 01, 2017 10:18 pm
United States of America

Re: Mythweb broken on Ubuntu 22.04

Post by Maven »

Beautiful! Installing Mythmusic worked. For the record, it appears that I also needed to add storage locations for music and do an initial music scan so that the music database could be created.
gary201
Newcomer
Posts: 1
Joined: Sat Aug 12, 2023 8:49 pm
United States of America

Re: [Solved] Mythweb broken on Ubuntu 22.04

Post by gary201 »

Installing MythMusic did nothing to solve the problem for me. I still get the following from both Firefox running on the back end as well as remotely.

Fatal error: Uncaught mysqli_sql_exception: Table 'mythconverg.music_songs' doesn't exist in /usr/share/mythtv/mythweb/classes/Database/Query/mysqlicompat.php:68 Stack trace: #0 /usr/share/mythtv/mythweb/classes/Database/Query/mysqlicompat.php(68): mysqli_query() #1 /usr/share/mythtv/mythweb/classes/Database.php(263): Database_Query_mysqlicompat->execute() #2 /usr/share/mythtv/mythweb/classes/Database.php(326): Database->query() #3 /usr/share/mythtv/mythweb/modules/music/init.php(15): Database->query_col() #4 /usr/share/mythtv/mythweb/classes/Modules.php(30): require_once('...') #5 /usr/share/mythtv/mythweb/classes/Modules.php(50): Modules::load() #6 /usr/share/mythtv/mythweb/mythweb.php(30): Modules::getModule() #7 {main} thrown in /usr/share/mythtv/mythweb/classes/Database/Query/mysqlicompat.php on line 68
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: [Solved] Mythweb broken on Ubuntu 22.04

Post by bill6502 »

Just taking a shot here:

Change directory to wherever your mythweb is installed (perhaps /usr/share/mythtv/mythweb
or /var/www). Then enter this command: grep --recursive "Silence exceptions in PHP 8.1.0"
If you don't get the following, then you're running an older version of mythweb.
The commits were released in June of 2022.

Code: Select all

classes/Database/mysqlicompat.php:        // Silence exceptions in PHP 8.1.0+
classes/Database/mysql.php:        // Silence exceptions in PHP 8.1.0+
Be sure to mention the version of MythTV you're running (mythbackend --version | grep "MythTV Version").
Last edited by bill6502 on Sun Aug 13, 2023 5:55 pm, edited 1 time in total.
Reason: Added a likely place Ubuntu installs mythweb.
Post Reply