Mailing List Archive

database on 32/fixes
Hi
I built 31/fixes on ubuntu 22.04. Everything is OK. On whim I built 32/fixes the myth part works fine but mythweb gives me this:

Fatal error: Uncaught mysqli_sql_exception: Table 'mythconverg.music_songs' doesn't exist in /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php:68 Stack trace: #0 /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php(68): mysqli_query() #1 /var/www/html/mythweb/classes/Database.php(263): Database_Query_mysqlicompat->execute() #2 /var/www/html/mythweb/classes/Database.php(326): Database->query() #3 /var/www/html/mythweb/modules/music/init.php(15): Database->query_col() #4 /var/www/html/mythweb/classes/Modules.php(30): require_once('...') #5 /var/www/html/lmythweb/classes/Modules.php(50): Modules::load() #6 /var/www/html/mythweb/mythweb.php(30): Modules::getModule() #7 {main} thrown in /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php on line 68

Looking at SQL indeed it does not exist (but does in 31 DB)
Since 'music_songs' is pretty ubiquitous I speculate an update went wrong (I started with a newly created DB)
What gives ?

James
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: database on 32/fixes [ In reply to ]
> On 25 Apr 2022, at 7:37 am, James <jam@tigger.ws> wrote:
>
> Hi
> I built 31/fixes on ubuntu 22.04. Everything is OK. On whim I built 32/fixes the myth part works fine but mythweb gives me this:
>
> Fatal error: Uncaught mysqli_sql_exception: Table 'mythconverg.music_songs' doesn't exist in /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php:68 Stack trace: #0 /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php(68): mysqli_query() #1 /var/www/html/mythweb/classes/Database.php(263): Database_Query_mysqlicompat->execute() #2 /var/www/html/mythweb/classes/Database.php(326): Database->query() #3 /var/www/html/mythweb/modules/music/init.php(15): Database->query_col() #4 /var/www/html/mythweb/classes/Modules.php(30): require_once('...') #5 /var/www/html/lmythweb/classes/Modules.php(50): Modules::load() #6 /var/www/html/mythweb/mythweb.php(30): Modules::getModule() #7 {main} thrown in /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php on line 68
>
> Looking at SQL indeed it does not exist (but does in 31 DB)
> Since 'music_songs' is pretty ubiquitous I speculate an update went wrong (I started with a newly created DB)
> What gives ?

I did the obvious - grabbed an empty music_songs from 31/fixes - all works.

James
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: database on 32/fixes [ In reply to ]
On Mon, 25 Apr 2022 10:14:32 +0800, you wrote:

>
>
>> On 25 Apr 2022, at 7:37 am, James <jam@tigger.ws> wrote:
>>
>> Hi
>> I built 31/fixes on ubuntu 22.04. Everything is OK. On whim I built 32/fixes the myth part works fine but mythweb gives me this:
>>
>> Fatal error: Uncaught mysqli_sql_exception: Table 'mythconverg.music_songs' doesn't exist in /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php:68 Stack trace: #0 /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php(68): mysqli_query() #1 /var/www/html/mythweb/classes/Database.php(263): Database_Query_mysqlicompat->execute() #2 /var/www/html/mythweb/classes/Database.php(326): Database->query() #3 /var/www/html/mythweb/modules/music/init.php(15): Database->query_col() #4 /var/www/html/mythweb/classes/Modules.php(30): require_once('...') #5 /var/www/html/lmythweb/classes/Modules.php(50): Modules::load() #6 /var/www/html/mythweb/mythweb.php(30): Modules::getModule() #7 {main} thrown in /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php on line 68
>>
>> Looking at SQL indeed it does not exist (but does in 31 DB)
>> Since 'music_songs' is pretty ubiquitous I speculate an update went wrong (I started with a newly created DB)
>> What gives ?
>
>I did the obvious - grabbed an empty music_songs from 31/fixes - all works.
>
>James

All my v32 databases have a music_songs table. On the system that I
play music on, it is full of data.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: database on 32/fixes [ In reply to ]
> On 25 Apr 2022, at 12:56 pm, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>
> On Mon, 25 Apr 2022 10:14:32 +0800, you wrote:
>
>>
>>
>>> On 25 Apr 2022, at 7:37 am, James <jam@tigger.ws> wrote:
>>>
>>> Hi
>>> I built 31/fixes on ubuntu 22.04. Everything is OK. On whim I built 32/fixes the myth part works fine but mythweb gives me this:
>>>
>>> Fatal error: Uncaught mysqli_sql_exception: Table 'mythconverg.music_songs' doesn't exist in /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php:68 Stack trace: #0 /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php(68): mysqli_query() #1 /var/www/html/mythweb/classes/Database.php(263): Database_Query_mysqlicompat->execute() #2 /var/www/html/mythweb/classes/Database.php(326): Database->query() #3 /var/www/html/mythweb/modules/music/init.php(15): Database->query_col() #4 /var/www/html/mythweb/classes/Modules.php(30): require_once('...') #5 /var/www/html/lmythweb/classes/Modules.php(50): Modules::load() #6 /var/www/html/mythweb/mythweb.php(30): Modules::getModule() #7 {main} thrown in /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php on line 68
>>>
>>> Looking at SQL indeed it does not exist (but does in 31 DB)
>>> Since 'music_songs' is pretty ubiquitous I speculate an update went wrong (I started with a newly created DB)
>>> What gives ?
>>
>> I did the obvious - grabbed an empty music_songs from 31/fixes - all works.
>>
>> James
>
> All my v32 databases have a music_songs table. On the system that I
> play music on, it is full of data.

Rather confused, not of great angst, it does work.
I built. from git

commit daa4e7e4474c019714d21674ee7e18f3bc89624d (HEAD -> fixes/32, origin/fixes/32)
Author: Klaas de Waal <klaas@kldo.nl>
Date: Fri Apr 22 21:04:59 2022 +0200

made an empty database

CREATE DATABASE IF NOT EXISTS mythconverg;

CREATE USER IF NOT EXISTS 'mythtv'@'localhost' IDENTIFIED WITH mysql_native_password;
ALTER USER 'mythtv'@'localhost' IDENTIFIED BY 'mythtv';
GRANT ALL ON mythconverg.* TO mythtv@localhost;
FLUSH PRIVILEGES;
GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@localhost;
FLUSH PRIVILEGES;

CREATE USER IF NOT EXISTS 'mythtv'@'192.168.5.%' IDENTIFIED WITH mysql_native_password;
ALTER USER 'mythtv'@'192.168.5.%' IDENTIFIED BY 'mythtv';
GRANT ALL ON mythconverg.* TO mythtv@'192.168.5.%';
FLUSH PRIVILEGES;
GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@'192.168.5.%';
FLUSH PRIVILEGES;

ALTER DATABASE mythconverg DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

mythtv-setup and allowed the DB upgrade

mysql> show tables;
+---------------------------+
| Tables_in_mythconverg |
+---------------------------+
| bdbookmark |
| capturecard |
| cardinput |
| channel |
| channelgroup |
| channelgroupnames |
| channelscan |
| channelscan_channel |
| channelscan_dtv_multiplex |
| codecparams |
| credits |
| customexample |
| diseqc_config |
| diseqc_tree |
| displayprofilegroups |
| displayprofiles |
| dtv_multiplex |
| dtv_privatetypes |
| dvdbookmark |
| dvdinput |
| dvdtranscode |
| eit_cache |
| filemarkup |
| gallery_directories |
| gallery_files |
| housekeeping |
| inputgroup |
| internetcontent |
| internetcontentarticles |
| inuseprograms |
| iptv_channel |
| jobqueue |
| jumppoints |
| keybindings |
| keyword |
| livestream |
| logging |
| mythlog |
| mythweb_sessions |
| oldfind |

And there it is gone!

??
James
Re: database on 32/fixes [ In reply to ]
On Mon, 25 Apr 2022 13:32:52 +0800, you wrote:

>
>
>> On 25 Apr 2022, at 12:56 pm, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>>
>> On Mon, 25 Apr 2022 10:14:32 +0800, you wrote:
>>
>>>
>>>
>>>> On 25 Apr 2022, at 7:37 am, James <jam@tigger.ws> wrote:
>>>>
>>>> Hi
>>>> I built 31/fixes on ubuntu 22.04. Everything is OK. On whim I built 32/fixes the myth part works fine but mythweb gives me this:
>>>>
>>>> Fatal error: Uncaught mysqli_sql_exception: Table 'mythconverg.music_songs' doesn't exist in /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php:68 Stack trace: #0 /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php(68): mysqli_query() #1 /var/www/html/mythweb/classes/Database.php(263): Database_Query_mysqlicompat->execute() #2 /var/www/html/mythweb/classes/Database.php(326): Database->query() #3 /var/www/html/mythweb/modules/music/init.php(15): Database->query_col() #4 /var/www/html/mythweb/classes/Modules.php(30): require_once('...') #5 /var/www/html/lmythweb/classes/Modules.php(50): Modules::load() #6 /var/www/html/mythweb/mythweb.php(30): Modules::getModule() #7 {main} thrown in /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php on line 68
>>>>
>>>> Looking at SQL indeed it does not exist (but does in 31 DB)
>>>> Since 'music_songs' is pretty ubiquitous I speculate an update went wrong (I started with a newly created DB)
>>>> What gives ?
>>>
>>> I did the obvious - grabbed an empty music_songs from 31/fixes - all works.
>>>
>>> James
>>
>> All my v32 databases have a music_songs table. On the system that I
>> play music on, it is full of data.
>
>Rather confused, not of great angst, it does work.
>I built. from git
>
>commit daa4e7e4474c019714d21674ee7e18f3bc89624d (HEAD -> fixes/32, origin/fixes/32)
>Author: Klaas de Waal <klaas@kldo.nl>
>Date: Fri Apr 22 21:04:59 2022 +0200
>
>made an empty database
>
>CREATE DATABASE IF NOT EXISTS mythconverg;
>
>CREATE USER IF NOT EXISTS 'mythtv'@'localhost' IDENTIFIED WITH mysql_native_password;
>ALTER USER 'mythtv'@'localhost' IDENTIFIED BY 'mythtv';
>GRANT ALL ON mythconverg.* TO mythtv@localhost;
>FLUSH PRIVILEGES;
>GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@localhost;
>FLUSH PRIVILEGES;
>
>CREATE USER IF NOT EXISTS 'mythtv'@'192.168.5.%' IDENTIFIED WITH mysql_native_password;
>ALTER USER 'mythtv'@'192.168.5.%' IDENTIFIED BY 'mythtv';
>GRANT ALL ON mythconverg.* TO mythtv@'192.168.5.%';
>FLUSH PRIVILEGES;
>GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@'192.168.5.%';
>FLUSH PRIVILEGES;
>
>ALTER DATABASE mythconverg DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
>
>mythtv-setup and allowed the DB upgrade
>
>mysql> show tables;
>+---------------------------+
>| Tables_in_mythconverg |
>+---------------------------+
>| bdbookmark |
>| capturecard |
>| cardinput |
>| channel |
>| channelgroup |
>| channelgroupnames |
>| channelscan |
>| channelscan_channel |
>| channelscan_dtv_multiplex |
>| codecparams |
>| credits |
>| customexample |
>| diseqc_config |
>| diseqc_tree |
>| displayprofilegroups |
>| displayprofiles |
>| dtv_multiplex |
>| dtv_privatetypes |
>| dvdbookmark |
>| dvdinput |
>| dvdtranscode |
>| eit_cache |
>| filemarkup |
>| gallery_directories |
>| gallery_files |
>| housekeeping |
>| inputgroup |
>| internetcontent |
>| internetcontentarticles |
>| inuseprograms |
>| iptv_channel |
>| jobqueue |
>| jumppoints |
>| keybindings |
>| keyword |
>| livestream |
>| logging |
>| mythlog |
>| mythweb_sessions |
>| oldfind |
>
>And there it is gone!
>
>??
>James

The tables for the mythmusic plugin are not created in an empty
database. You have to install the frontend only mythmusic plugin and
then run mythfrontend. On the first run of the mythmusic plugin, it
will create the music tables, or upgrade them to the latest schema if
they already exist.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: database on 32/fixes [ In reply to ]
> On 25 Apr 2022, at 1:47 pm, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>
> The tables for the mythmusic plugin are not created in an empty
> database. You have to install the frontend only mythmusic plugin and
> then run mythfrontend. On the first run of the mythmusic plugin, it
> will create the music tables, or upgrade them to the latest schema if
> they already exist.

That makes sense, but it is silly for mythweb to have such a prerequesit
James
Re: database on 32/fixes [ In reply to ]
On 25/04/2022 07:15, James wrote:
>
>
>> On 25 Apr 2022, at 1:47 pm, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>>
>> The tables for the mythmusic plugin are not created in an empty
>> database. You have to install the frontend only mythmusic plugin and
>> then run mythfrontend. On the first run of the mythmusic plugin, it
>> will create the music tables, or upgrade them to the latest schema if
>> they already exist.
>
> That makes sense, but it is silly for mythweb to have such a prerequesit
>
Indeed. On my system Mythweb runs on a headless master backend, where there is no requirement for
any plugins and it makes no sense to install any. In fact, pulling the backend out of its rack and
connecting a keyboard and monitor just to install mythmusic would be a major operation. Running the
frontend remotely would be almost as difficult.

I do not use mythmusic or any plugins at all so this requirement does seem unusual.

--

Mike Perkins

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: database on 32/fixes [ In reply to ]
On 25/04/2022 10:04, Mike Perkins wrote:
> On 25/04/2022 07:15, James wrote:
>>
>>
>>> On 25 Apr 2022, at 1:47 pm, Stephen Worthington
>>> <stephen_agent@jsw.gen.nz> wrote:
>>>
>>> The tables for the mythmusic plugin are not created in an empty
>>> database.  You have to install the frontend only mythmusic plugin and
>>> then run mythfrontend.  On the first run of the mythmusic plugin, it
>>> will create the music tables, or upgrade them to the latest schema if
>>> they already exist.
>>
>> That makes sense, but it is silly for mythweb to have such a prerequesit
>>
> Indeed. On my system Mythweb runs on a headless master backend, where
> there is no requirement for any plugins and it makes no sense to install
> any. In fact, pulling the backend out of its rack and connecting a
> keyboard and monitor just to install mythmusic would be a major
> operation. Running the frontend remotely would be almost as difficult.
>
> I do not use mythmusic or any plugins at all so this requirement does
> seem unusual.
>

If somebody would like to write a patch so that mythweb doesn't fail
if these tables are missing (just disables the relevant functionality)
then we can look at merging that


Regards
Stuart

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: database on 32/fixes [ In reply to ]
On Mon, 25 Apr 2022 14:15:50 +0800, you wrote:

>
>
>> On 25 Apr 2022, at 1:47 pm, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>>
>> The tables for the mythmusic plugin are not created in an empty
>> database. You have to install the frontend only mythmusic plugin and
>> then run mythfrontend. On the first run of the mythmusic plugin, it
>> will create the music tables, or upgrade them to the latest schema if
>> they already exist.
>
>That makes sense, but it is silly for mythweb to have such a prerequesit
>James

Yes, so it must have found something that made it think mythmusic was
installed, and then went looking for the music tables. There are lots
of people out there with mythweb installed and no mythmusic, so
normally mythweb must correctly detect the absence of mythmusic.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: database on 32/fixes [ In reply to ]
> On 25 Apr 2022, at 5:12 pm, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>
> On Mon, 25 Apr 2022 14:15:50 +0800, you wrote:
>
>>
>>
>>> On 25 Apr 2022, at 1:47 pm, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>>>
>>> The tables for the mythmusic plugin are not created in an empty
>>> database. You have to install the frontend only mythmusic plugin and
>>> then run mythfrontend. On the first run of the mythmusic plugin, it
>>> will create the music tables, or upgrade them to the latest schema if
>>> they already exist.
>>
>> That makes sense, but it is silly for mythweb to have such a prerequesit
>> James
>
> Yes, so it must have found something that made it think mythmusic was
> installed, and then went looking for the music tables. There are lots
> of people out there with mythweb installed and no mythmusic, so
> normally mythweb must correctly detect the absence of mythmusic

Hmmmm I built NO plugins and no config (eg source directory) that I think would lead to conclude that.
I guess I should read the src to find out WHY
perchance the ppa that most are using ... anyone using fixes/32 and mythweb please
$ mysql -umythtv -pmythtv mythconverg
> show tables;

does music_songs appear

/q
James

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: database on 32/fixes [ In reply to ]
On 4/25/22 07:48, James wrote:
>
>> On 25 Apr 2022, at 5:12 pm, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>>
>> On Mon, 25 Apr 2022 14:15:50 +0800, you wrote:
>>
>>>
>>>> On 25 Apr 2022, at 1:47 pm, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>>>>
>>>> The tables for the mythmusic plugin are not created in an empty
>>>> database. You have to install the frontend only mythmusic plugin and
>>>> then run mythfrontend. On the first run of the mythmusic plugin, it
>>>> will create the music tables, or upgrade them to the latest schema if
>>>> they already exist.
>>> That makes sense, but it is silly for mythweb to have such a prerequesit
>>> James
>> Yes, so it must have found something that made it think mythmusic was
>> installed, and then went looking for the music tables. There are lots
>> of people out there with mythweb installed and no mythmusic, so
>> normally mythweb must correctly detect the absence of mythmusic
> Hmmmm I built NO plugins and no config (eg source directory) that I think would lead to conclude that.
> I guess I should read the src to find out WHY
> perchance the ppa that most are using ... anyone using fixes/32 and mythweb please
> $ mysql -umythtv -pmythtv mythconverg
>> show tables;
> does music_songs appear
>
> /q
> James
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

I do not use mythmusic but most of my systems have the tables since at
some time or other I have installed plugins.

I do have one test system that does not have the music tables and
mythweb works fine on there (latest master of mythtv). Which page in
mythweb is giving you a problem?

Peter


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: database on 32/fixes [ In reply to ]
> On 25 Apr 2022, at 9:43 pm, Peter Bennett <pb.mythtv@gmail.com> wrote:
>
> I do not use mythmusic but most of my systems have the tables since at some time or other I have installed plugins.
>
> I do have one test system that does not have the music tables and mythweb works fine on there (latest master of mythtv). Which page in mythweb is giving you a problem?

All of them!!
start fails with the traceback I gave :-)
but having entered an empty table, all is well. I repeated the whole procedure
$ git clean -X -i
./configure
make
make install
new empty DB
mythtv-setup

same result
James
Re: database on 32/fixes [ In reply to ]
On 25/04/2022 14:53, James wrote:

>
>
>> On 25 Apr 2022, at 9:43 pm, Peter Bennett <pb.mythtv@gmail.com> wrote:
>>
>> I do not use mythmusic but most of my systems have the tables since
>> at some time or other I have installed plugins.
>>
>> I do have one test system that does not have the music tables and
>> mythweb works fine on there (latest master of mythtv). Which page in
>> mythweb is giving you a problem?
>
> All of them!!
> start fails with the traceback I gave :-)
> but having entered an empty table, all is well. I repeated the whole
> procedure
> $ git clean -X -i
> ./configure
> make
> make install
> new empty DB
> mythtv-setup
>
> same result
> James
>
Looks like all db errors are being treated as fatal on your system but
not on others.

https://github.com/MythTV/mythweb/blob/master/modules/music/init.php#L14

It looks like that code should first disable fatal errors, check for the
existence of the music_songs table and enable or disable the music
module accordingly.

Paul H.
Re: database on 32/fixes [ In reply to ]
> On 25 Apr 2022, at 10:31 pm, Paul Harrison <mythtv@mythqml.net> wrote:
>
> Looks like all db errors are being treated as fatal on your system but not on others.
>
> https://github.com/MythTV/mythweb/blob/master/modules/music/init.php#L14 <https://github.com/MythTV/mythweb/blob/master/modules/music/init.php#L14>
> It looks like that code should first disable fatal errors, check for the existence of the music_songs table and enable or disable the music module accordingly.
>

I'm not going to lose sleep but:


// First, we should check to see that MythMusic is configured.
// Make sure to turn off fatal errors in case the table isn't there.
$db->disable_fatal_errors();
$has_music = $db->query_col('SELECT COUNT(*) FROM music_songs');
$db->enable_fatal_errors();
$db->error(false);

But I get a fatal error! maybe there's another check?


Fatal error: Uncaught mysqli_sql_exception: Table 'mythconverg.music_songs' doesn't exist in /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php:68 Stack trace: #0 /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php(68): mysqli_query()

Yup
James
Re: database on 32/fixes [ In reply to ]
On 25/04/2022 11:04, Mike Perkins wrote:
> Indeed. On my system Mythweb runs on a headless master backend, where
> there is no requirement for any plugins and it makes no sense to install
> any. In fact, pulling the backend out of its rack and connecting a
> keyboard and monitor just to install mythmusic would be a major
> operation. Running the frontend remotely would be almost as difficult.

ssh -Y into the box (e.g. from a laptop) and run the frontend. Playback
would be horrible, but administrative tasks like this can be performed
very easily this way. Also works with mythtv-setup.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: database on 32/fixes [ In reply to ]
On 25/04/2022 15:53, James wrote:

>
>
>> On 25 Apr 2022, at 10:31 pm, Paul Harrison <mythtv@mythqml.net> wrote:
>>
>> Looks like all db errors are being treated as fatal on your system
>> but not on others.
>>
>> https://github.com/MythTV/mythweb/blob/master/modules/music/init.php#L14
>>
>> It looks like that code should first disable fatal errors, check for
>> the existence of the music_songs table and enable or disable the
>> music module accordingly.
>>
>
> I'm not going to lose sleep but:
>
>
> // First, we should check to see that MythMusic is configured.
> // Make sure to turn off fatal errors in case the table isn't there.
>     $db->disable_fatal_errors();
>     $has_music = $db->query_col('SELECT COUNT(*) FROM music_songs');
>     $db->enable_fatal_errors();
>     $db->error(false);
>
> But I get a fatal error! maybe there's another check?
>
>
> Fatal error: Uncaught mysqli_sql_exception: Table
> 'mythconverg.music_songs' doesn't exist in
> /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php:68 Stack
> trace: #0
> /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php(68):
> mysqli_query()
>
> Yup
> James
>

Are you using php 8.1 or later?

https://php.watch/versions/8.1/mysqli-error-mode


Paul H.
Re: database on 32/fixes [ In reply to ]
On Mon, Apr 25, 2022 at 5:27 PM Paul Harrison <mythtv@mythqml.net> wrote:

> On 25/04/2022 15:53, James wrote:
>
>
>
> On 25 Apr 2022, at 10:31 pm, Paul Harrison <mythtv@mythqml.net> wrote:
>
> Looks like all db errors are being treated as fatal on your system but not
> on others.
>
> https://github.com/MythTV/mythweb/blob/master/modules/music/init.php#L14
>
> It looks like that code should first disable fatal errors, check for the
> existence of the music_songs table and enable or disable the music module
> accordingly.
>
>
> I'm not going to lose sleep but:
>
>
> // First, we should check to see that MythMusic is configured.
> // Make sure to turn off fatal errors in case the table isn't there.
> $db->disable_fatal_errors();
> $has_music = $db->query_col('SELECT COUNT(*) FROM music_songs');
> $db->enable_fatal_errors();
> $db->error(false);
>
> But I get a fatal error! maybe there's another check?
>
>
> Fatal error: Uncaught mysqli_sql_exception: Table
> 'mythconverg.music_songs' doesn't exist in
> /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php:68 Stack
> trace: #0
> /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php(68):
> mysqli_query()
>
> Yup
> James
>
>
> Are you using php 8.1 or later?
>
> https://php.watch/versions/8.1/mysqli-error-mode
>
>
> Paul H.
>

This was already reported here (including the full stack trace):
http://lists.mythtv.org/pipermail/mythtv-users/2022-January/408819.html

Seems to be related to php 8.1

Roland
Re: database on 32/fixes [ In reply to ]
> On 25 Apr 2022, at 11:24 pm, Paul Harrison <mythtv@mythqml.net> wrote:
>
> Are you using php 8.1 or later?
>
> https://php.watch/versions/8.1/mysqli-error-mode <https://php.watch/versions/8.1/mysqli-error-mode>
>
>
Yup thats it, thanks.

Mike my backend is headless too. It is no-charge but not free which is a pain, but works very well: nomachine

James
Re: database on 32/fixes [ In reply to ]
On 25/04/2022 23:11, James wrote:
>
>
>> On 25 Apr 2022, at 11:24 pm, Paul Harrison <mythtv@mythqml.net> wrote:
>>
>> Are you using php 8.1 or later?
>>
>> https://php.watch/versions/8.1/mysqli-error-mode <https://php.watch/versions/8.1/mysqli-error-mode>
>>
>>
> Yup thats it, thanks.
>
> Mike my backend is headless too. It is no-charge but not free which is a pain, but works very well: nomachine
>
> James
>
Actually we use x2go from thin clients to our main server but I never considered adding an x2go
server to the myth backend. Hmm. May give that a try.

Incidentally, I can use x2go to access my (separate) zoneminder server via:

Thin client -> Main server (a KVM guest) -> Zoneminder server via http and get live HD video from
the cameras! I did not think that would be possible.

I know that won't work with mythtv because the frontend handles the video generation itself.

--

Mike Perkins

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: database on 32/fixes [ In reply to ]
On 26/04/2022 09:16, Mike Perkins wrote:
> On 25/04/2022 23:11, James wrote:
>>
>>
>>> On 25 Apr 2022, at 11:24 pm, Paul Harrison <mythtv@mythqml.net> wrote:
>>>
>>> Are you using php 8.1 or later?
>>>
>>> https://php.watch/versions/8.1/mysqli-error-mode
>>> <https://php.watch/versions/8.1/mysqli-error-mode>
>>>
>>>
>> Yup thats it, thanks.
>>
>> Mike my backend is headless too. It is no-charge but not free which
>> is a pain, but works very well: nomachine
>>
>> James
>>
> Actually we use x2go from thin clients to our main server but I never
> considered adding an x2go server to the myth backend. Hmm. May give
> that a try.
>
> Incidentally, I can use x2go to access my (separate) zoneminder server
> via:
>
> Thin client -> Main server (a KVM guest) -> Zoneminder server via http
> and get live HD video from the cameras! I did not think that would be
> possible.
>
> I know that won't work with mythtv because the frontend handles the
> video generation itself.
>

The new backend WebApp if it ever gets completed would allow you to
maintain/configure the backend using either a web browser or other third
party client that uses the same Services API.


Stuart and I was both hoping that if we started to work on it it would 
promote some interest from both fellow developers and users who would be
motivated to help out, it's a big project for one or two developers and
it really needs a group effort,  but sadly it went down like a lead
balloon and development as all but stopped for the moment :(


Paul H.

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: database on 32/fixes [ In reply to ]
> The new backend WebApp if it ever gets completed would allow you to maintain/configure the backend using either a web browser or other third party client that uses the same Services API.
>
>
> Stuart and I was both hoping that if we started to work on it it would promote some interest from both fellow developers and users who would be motivated to help out, it's a big project for one or two developers and it really needs a group effort, but sadly it went down like a lead balloon and development as all but stopped for the moment :(

I absolutely understand "Any Port in a storm" but in the last 10 years I've spent more time chasing problems with python than all else combined. The latest is backintime on ubuntu 22.04.
If we avoided python here it would make the final bit much more pleasurable.
James
Re: database on 32/fixes [ In reply to ]
On 28/04/2022 12:55, James wrote:

>
>> The new backend WebApp if it ever gets completed would allow you to
>> maintain/configure the backend using either a web browser or other
>> third party client that uses the same Services API.
>>
>>
>> Stuart and I was both hoping that if we started to work on it it
>> would  promote some interest from both fellow developers and users
>> who would be motivated to help out, it's a big project for one or two
>> developers and it really needs a group effort,  but sadly it went
>> down like a lead balloon and development as all but stopped for the
>> moment :(
>
> I absolutely understand "Any Port in a storm" but in the last 10 years
> I've spent more time chasing problems with python than all else
> combined. The latest is backintime on ubuntu 22.04.
> If we avoided python here it would make the final bit much more
> pleasurable.
> James
>
>

In that case you will be pleased to know that there is no Python
involved in the Services API or the WebApp :)


For anyone interested the backend server that handles the API requests
is c++ and the WebApp is built using Angular which is mainly TypeScript
with some HTML and CSS thrown in.


Paul H.