[mythtv-users] database on 32/fixes

Paul Harrison mythtv at mythqml.net
Mon Apr 25 15:24:16 UTC 2022


On 25/04/2022 15:53, James wrote:

>
>
>> On 25 Apr 2022, at 10:31 pm, Paul Harrison <mythtv at 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20220425/21914c60/attachment.htm>


More information about the mythtv-users mailing list