Mailing List Archive

mythweb
Hi

I’m out of my depth, maybe Stuart can comment:

[web page]

skin_urlimg/mythtv-logo.png" alt="MythTV" class="alpha_png">
------------------
Fatal error: Uncaught Error: Call to a member function query_col() on null in /srv/www/htdocs/mythweb/modules/backend_log/init.php:15 Stack trace: #0 /srv/www/htdocs/mythweb/classes/Modules.php(30): require_once() #1 /srv/www/htdocs/mythweb/classes/Modules.php(50): Modules::load() #2 /srv/www/htdocs/mythweb/modules/_shared/tmpl/default/header.php(144): Modules::getModule() #3 /srv/www/htdocs/mythweb/modules/_shared/tmpl/_errors/error.php(19): include('/srv/www/htdocs...') #4 /srv/www/htdocs/mythweb/includes/errordisplay.php(198): require_once('/srv/www/htdocs...') #5 /srv/www/htdocs/mythweb/includes/database.php(15): custom_error() #6 /srv/www/htdocs/mythweb/includes/init.php(43): require_once('/srv/www/htdocs...') #7 /srv/www/htdocs/mythweb/mythweb.php(20): require_once('/srv/www/htdocs...') #8 {main} thrown in /srv/www/htdocs/mythweb/modules/backend_log/init.php on line 15



[sandypit] /home/jam [1004]% cat /srv/www/htdocs/mythweb/modules/backend_log/init.php
<?php
/**
* Initialization routines for the MythWeb Backend Logs module
*
* @license GPL
*
* @package MythWeb
* @subpackage Logs
*
**/

global $db;
echo "------------------ $db";
// Check to see if database logging has been enabled
$enabled = $db->query_col('SELECT SUM(data) FROM settings WHERE value="LogEnabled"');

// The TV module is always enabled.
if ($enabled > 0)
$Modules['backend_log'] = array('path' => 'backend_log',
'sort' => 550,
'name' => t('Logs'),
);


So it looks like $db is NULL

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
mythweb [ In reply to ]
Hi


Much spelunking

This is where it fails

database.php
<?php
/**
* This file is part of MythWeb, a php-based interface for MythTV.
* See http://www.mythtv.org/ for details.
*
* @license GPL
*
* @package MythWeb
*
**/
// No MySQL libraries installed in PHP
if (!function_exists('mysqli_connect')) {
echo ":-(“;<-------------------------------------------------------------------------
custom_error("Please install the MySQL libraries for PHP.\n"
.'The package is usually called something like php-mysql.');
}



[sandypit] /srv/www/htdocs/mythweb [1034]% rpm -ql php-pear-MDB2_Driver_mysqli
/usr/share/php7/PEAR/MDB2
/usr/share/php7/PEAR/MDB2/Driver
/usr/share/php7/PEAR/MDB2/Driver/Datatype
/usr/share/php7/PEAR/MDB2/Driver/Datatype/mysqli.php
/usr/share/php7/PEAR/MDB2/Driver/Function
/usr/share/php7/PEAR/MDB2/Driver/Function/mysqli.php
/usr/share/php7/PEAR/MDB2/Driver/Manager
/usr/share/php7/PEAR/MDB2/Driver/Manager/mysqli.php
/usr/share/php7/PEAR/MDB2/Driver/Native
/usr/share/php7/PEAR/MDB2/Driver/Native/mysqli.php
/usr/share/php7/PEAR/MDB2/Driver/Reverse
/usr/share/php7/PEAR/MDB2/Driver/Reverse/mysqli.php
/usr/share/php7/PEAR/MDB2/Driver/mysqli.php
/usr/share/php7/PEAR/data
/usr/share/php7/PEAR/data/MDB2_Driver_mysqli
/usr/share/php7/PEAR/data/MDB2_Driver_mysqli/package_mysqli.xml
/var/lib/pear/MDB2_Driver_mysqli.xml


[sandypit] /srv/www/htdocs/mythweb [1035]% rpm -ql php7-mysql
/etc/php7/conf.d/mysqli.ini
/etc/php7/conf.d/pdo_mysql.ini
/usr/lib64/php7/extensions/mysqli.so
/usr/lib64/php7/extensions/pdo_mysql.so

How do I debug further
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: mythweb [ In reply to ]
Progress but still no cigar

include mysqli modules

J
_______________________________________________
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: mythweb [ In reply to ]
Whew!

First the git release of mythweb required NO changes.
(This is for open suse)
I needed to download and enable modules:

For suse edit the module list is in /etc/sysconfig/apache2 and add php7 rewrite mysqli posix
change permissions chown -R wwwrun /src/www/htdocs/mythweb/data

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: mythweb [ In reply to ]
On 27/08/2020 03:42, Blue wrote:
> Hi
>
> I’m out of my depth, maybe Stuart can comment:
>
> [web page]
> …
> skin_urlimg/mythtv-logo.png" alt="MythTV" class="alpha_png">
> ------------------
> Fatal error: Uncaught Error: Call to a member function query_col() on null in /srv/www/htdocs/mythweb/modules/backend_log/init.php:15 Stack trace: #0 /srv/www/htdocs/mythweb/classes/Modules.php(30): require_once() #1 /srv/www/htdocs/mythweb/classes/Modules.php(50): Modules::load() #2 /srv/www/htdocs/mythweb/modules/_shared/tmpl/default/header.php(144): Modules::getModule() #3 /srv/www/htdocs/mythweb/modules/_shared/tmpl/_errors/error.php(19): include('/srv/www/htdocs...') #4 /srv/www/htdocs/mythweb/includes/errordisplay.php(198): require_once('/srv/www/htdocs...') #5 /srv/www/htdocs/mythweb/includes/database.php(15): custom_error() #6 /srv/www/htdocs/mythweb/includes/init.php(43): require_once('/srv/www/htdocs...') #7 /srv/www/htdocs/mythweb/mythweb.php(20): require_once('/srv/www/htdocs...') #8 {main} thrown in /srv/www/htdocs/mythweb/modules/backend_log/init.php on line 15
>
>
>
> [sandypit] /home/jam [1004]% cat /srv/www/htdocs/mythweb/modules/backend_log/init.php
> <?php
> /**
> * Initialization routines for the MythWeb Backend Logs module
> *
> * @license GPL
> *
> * @package MythWeb
> * @subpackage Logs
> *
> **/
>
> global $db;
> echo "------------------ $db";
> // Check to see if database logging has been enabled
> $enabled = $db->query_col('SELECT SUM(data) FROM settings WHERE value="LogEnabled"');
>
> // The TV module is always enabled.
> if ($enabled > 0)
> $Modules['backend_log'] = array('path' => 'backend_log',
> 'sort' => 550,
> 'name' => t('Logs'),
> );
>
>
> So it looks like $db is NULL
>

Are you trying to tell mythweb to use DB logging?
Because that hasn't actually existed for years......

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