MythWeb only with warnings and errors

For discussion of topics specific to MythTV on linux
DaHorstl
Junior
Posts: 24
Joined: Mon Dec 07, 2020 8:35 pm
Austria

Re: MythWeb only with warnings and errors

Post by DaHorstl » Sat Feb 27, 2021 10:18 pm

I rebooted the whole machine after each changes today. :-)

User avatar
bill6502
Developer
Posts: 1897
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: MythWeb only with warnings and errors

Post by bill6502 » Sat Feb 27, 2021 10:37 pm

OK, reboots work fine. You can save time by just restarting Apache though.

I'd check for clues in the Apache log. sudo tail -f /var/log/apache2/error.log

Then attempt to access mythweb again. It still concerns me that the the error
message has the empty string '' where 'myhtv' should be. You may want to
look at the entire log to see if there's mention of the .conf files being used.

You shouldn't need to test since the backend is working, but the following
test removes MythTV and mythweb from the picture:

mysql --host=localhost --user=mythtv --password=YourPasswordFromConfig.xml mythconverg

DaHorstl
Junior
Posts: 24
Joined: Mon Dec 07, 2020 8:35 pm
Austria

Re: MythWeb only with warnings and errors

Post by DaHorstl » Sat Feb 27, 2021 10:52 pm

Hi,

/var/log/apache2/error.log shows from the last shutdown:

Code: Select all

[Sat Feb 27 23:01:49.513280 2021] [mpm_prefork:notice] [pid 1270] AH00169: caught SIGTERM, shutting down
[Sat Feb 27 23:04:08.791680 2021] [mpm_prefork:notice] [pid 1306] AH00163: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Sat Feb 27 23:04:08.933788 2021] [core:notice] [pid 1306] AH00094: Command line: '/usr/sbin/apache2'
[Sat Feb 27 23:05:54.007058 2021] [php7:warn] [pid 1316] [client 192.168.1.101:55672] PHP Warning:  Use of undefined constant tmpl - assumed 'tmpl' (this will throw an Error in a future version of PHP) in /usr/share/mythtv/mythweb/includes/utils.php on line 334
[Sat Feb 27 23:05:54.007152 2021] [php7:warn] [pid 1316] [client 192.168.1.101:55672] PHP Warning:  Use of undefined constant tmpl - assumed 'tmpl' (this will throw an Error in a future version of PHP) in /usr/share/mythtv/mythweb/includes/utils.php on line 335
[Sat Feb 27 23:05:54.066326 2021] [php7:error] [pid 1316] [client 192.168.1.101:55672] PHP Fatal error:  Uncaught Error: Call to undefined function t() in /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/footer.php:21\nStack trace:\n#0 /usr/share/mythtv/mythweb/modules/_shared/tmpl/_errors/fatal.php(43): require()\n#1 /usr/share/mythtv/mythweb/includes/errors.php(128): require_once('/usr/share/myth...')\n#2 [internal function]: error_handler()\n#3 /usr/share/mythtv/mythweb/classes/Database/Query/mysqlicompat.php(66): trigger_error()\n#4 /usr/share/mythtv/mythweb/classes/Database.php(263): Database_Query_mysqlicompat->execute()\n#5 /usr/share/mythtv/mythweb/classes/Database.php(124): Database->query()\n#6 /usr/share/mythtv/mythweb/includes/database.php(65): Database::connect()\n#7 /usr/share/mythtv/mythweb/includes/init.php(43): require_once('/usr/share/myth...')\n#8 /usr/share/mythtv/mythweb/index.php(20): require_once('/usr/share/myth...')\n#9 {main}\n  thrown in /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/footer.php on line 21
[Sat Feb 27 23:05:55.321140 2021] [php7:warn] [pid 1314] [client 192.168.1.101:55673] PHP Warning:  Use of undefined constant tmpl - assumed 'tmpl' (this will throw an Error in a future version of PHP) in /usr/share/mythtv/mythweb/includes/utils.php on line 334
[Sat Feb 27 23:05:55.321211 2021] [php7:warn] [pid 1314] [client 192.168.1.101:55673] PHP Warning:  Use of undefined constant tmpl - assumed 'tmpl' (this will throw an Error in a future version of PHP) in /usr/share/mythtv/mythweb/includes/utils.php on line 335
[Sat Feb 27 23:05:55.321322 2021] [php7:error] [pid 1314] [client 192.168.1.101:55673] PHP Fatal error:  Uncaught Error: Call to undefined function t() in /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/footer.php:21\nStack trace:\n#0 /usr/share/mythtv/mythweb/modules/_shared/tmpl/_errors/fatal.php(43): require()\n#1 /usr/share/mythtv/mythweb/includes/errors.php(128): require_once('/usr/share/myth...')\n#2 [internal function]: error_handler()\n#3 /usr/share/mythtv/mythweb/classes/Database/Query/mysqlicompat.php(66): trigger_error()\n#4 /usr/share/mythtv/mythweb/classes/Database.php(263): Database_Query_mysqlicompat->execute()\n#5 /usr/share/mythtv/mythweb/classes/Database.php(124): Database->query()\n#6 /usr/share/mythtv/mythweb/includes/database.php(65): Database::connect()\n#7 /usr/share/mythtv/mythweb/includes/init.php(43): require_once('/usr/share/myth...')\n#8 /usr/share/mythtv/mythweb/index.php(20): require_once('/usr/share/myth...')\n#9 {main}\n  thrown in /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/footer.php on line 21
[Sat Feb 27 23:11:04.337427 2021] [php7:warn] [pid 1317] [client 192.168.1.101:55738] PHP Warning:  Use of undefined constant tmpl - assumed 'tmpl' (this will throw an Error in a future version of PHP) in /usr/share/mythtv/mythweb/includes/utils.php on line 334
[Sat Feb 27 23:11:04.337499 2021] [php7:warn] [pid 1317] [client 192.168.1.101:55738] PHP Warning:  Use of undefined constant tmpl - assumed 'tmpl' (this will throw an Error in a future version of PHP) in /usr/share/mythtv/mythweb/includes/utils.php on line 335
[Sat Feb 27 23:11:04.337654 2021] [php7:error] [pid 1317] [client 192.168.1.101:55738] PHP Fatal error:  Uncaught Error: Call to undefined function t() in /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/footer.php:21\nStack trace:\n#0 /usr/share/mythtv/mythweb/modules/_shared/tmpl/_errors/fatal.php(43): require()\n#1 /usr/share/mythtv/mythweb/includes/errors.php(128): require_once('/usr/share/myth...')\n#2 [internal function]: error_handler()\n#3 /usr/share/mythtv/mythweb/classes/Database/Query/mysqlicompat.php(66): trigger_error()\n#4 /usr/share/mythtv/mythweb/classes/Database.php(263): Database_Query_mysqlicompat->execute()\n#5 /usr/share/mythtv/mythweb/classes/Database.php(124): Database->query()\n#6 /usr/share/mythtv/mythweb/includes/database.php(65): Database::connect()\n#7 /usr/share/mythtv/mythweb/includes/init.php(43): require_once('/usr/share/myth...')\n#8 /usr/share/mythtv/mythweb/index.php(20): require_once('/usr/share/myth...')\n#9 {main}\n  thrown in /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/footer.php on line 21
So, I cannot find any hint to a .conf file?? :-/

BTW: PHP is working; I let my main site write the phpinfo().


What will happen when I use this command?
mysql --host=localhost --user=mythtv --password=YourPasswordFromConfig.xml mythconverg

Kind regards,
Horst

User avatar
bill6502
Developer
Posts: 1897
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: MythWeb only with warnings and errors

Post by bill6502 » Sat Feb 27, 2021 10:56 pm

The mysql command just logs into the DB. Type control D to exit.

DaHorstl
Junior
Posts: 24
Joined: Mon Dec 07, 2020 8:35 pm
Austria

Re: MythWeb only with warnings and errors

Post by DaHorstl » Sat Feb 27, 2021 11:05 pm

OK, I did it. It did not change anything.
How can I see the logs? Sorry, I am not that knowledgeable with MySQL.

User avatar
bill6502
Developer
Posts: 1897
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: MythWeb only with warnings and errors

Post by bill6502 » Sat Feb 27, 2021 11:18 pm

It's just a test of the user/password/host credentials. If you were logged into the DB,
then all is well DB login wise.

DaHorstl
Junior
Posts: 24
Joined: Mon Dec 07, 2020 8:35 pm
Austria

Re: MythWeb only with warnings and errors

Post by DaHorstl » Sat Feb 27, 2021 11:20 pm

Ah, I see.
Well, yes, it works. I can enter the database. :-)

DaHorstl
Junior
Posts: 24
Joined: Mon Dec 07, 2020 8:35 pm
Austria

Re: MythWeb only with warnings and errors

Post by DaHorstl » Sat Feb 27, 2021 11:48 pm

But I still get the Fatal error. :-(

Beginning with:
!!NoTrans: Access denied for user ''@'localhost' (using password: NO) [#1045]

Well... I understand with "localhost" the MythTV Backend (192.168.1.10). But, what happens when I call it from another machine (192.168.1.101), what I do all the time?
Is "localhost" still the Backend or is it reffered to the client?

And: The problem is on the same Windows 10 machine with Firefox as well as with Edge.

Thank you!
Kind regards,
Horst

User avatar
bill6502
Developer
Posts: 1897
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: MythWeb only with warnings and errors

Post by bill6502 » Sun Feb 28, 2021 12:05 am

mysql --host=... was just a test, it doesn't fix anything.

localhost is correct. Other hosts connect to mythweb on the backend, which then
accesses the DB. At least, that's what my: setenv db_server "localhost" is set to.

You'll see LogLevel in some of the Apache .conf files. Mine's set to warn. You could
try setting it to debug to gather more data. There may be a way to find our what
.conf files are in play.

DaHorstl
Junior
Posts: 24
Joined: Mon Dec 07, 2020 8:35 pm
Austria

Re: MythWeb only with warnings and errors

Post by DaHorstl » Sun Feb 28, 2021 12:11 am

I just saw something:
apache2.conf says:

Code: Select all

<Directory "/var/www/html/mythweb">
  Options Indexes FollowSymLinks
  AuthType Digest
  AuthName "MythTV"
  AuthUserFile /etc/apache2/passwd/passwords
  Require valid-user
  Order allow,deny
  Allow from 192.168.1.
  Satisfy any
</Directory>
BUT: Neighter the directory passwd nor the AuthUserFile passwords exists...
Could THIS be the problem??

DaHorstl
Junior
Posts: 24
Joined: Mon Dec 07, 2020 8:35 pm
Austria

Re: MythWeb only with warnings and errors

Post by DaHorstl » Sun Feb 28, 2021 12:32 am

How should the /etc/apache2/passwd/passwords look like?

Thank you very much and have a goot night!

Kind regards,
Horst

User avatar
bill6502
Developer
Posts: 1897
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: MythWeb only with warnings and errors

Post by bill6502 » Sun Feb 28, 2021 1:24 am

I doubt this will help. The password is prompted for before the mythweb page is used.
Doesn't hurt to have it though. In fact, the developer recommends using it.

Something like: htdigest -c /etc/apache2/passwd/passwords mythweb someNameYouWantToLoginAs

My file is in a different place.

Mine looks similar to this: bill:mythweb:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx and ls -l shows this:

Code: Select all

-rw-r----- 1 mythtv www-data 54 Jan 16  2020 /etc/mythtv/mythweb-htdigest
Change the owner and group manually.

DaHorstl
Junior
Posts: 24
Joined: Mon Dec 07, 2020 8:35 pm
Austria

Re: MythWeb only with warnings and errors

Post by DaHorstl » Sun Feb 28, 2021 6:02 pm

Hi, I hope you had a nice sunday so far?

@bill6502,
the good news is, that your feeling won't let you down. You were right.
The bad news are: You were right. It did not help.
The "Fatal error" message is still on the web site :-(
What can I do?? Thank you!

DaHorstl
Junior
Posts: 24
Joined: Mon Dec 07, 2020 8:35 pm
Austria

Re: MythWeb only with warnings and errors

Post by DaHorstl » Fri Mar 05, 2021 6:33 pm

Hi, everyone,
unfortunately my problem is still not solved. :-(

How can I completely reset MythWeb (best solution to uninstall and install it like from scratch) without interfering MythTV? I already tried that on 23rd February as mentioned above, but maybe I did not delete everything. :-(

Thank you for your help!
Kind regards,
Horst

User avatar
bill6502
Developer
Posts: 1897
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: MythWeb only with warnings and errors

Post by bill6502 » Tue Mar 09, 2021 6:33 pm

Are all of the <Directory> linens in all of the .conf files in /etc/apache2/sites-available
set to the same locations? This looks different (but I'm not an Apache person).

/etc/apache2/sites-available/mythweb.conf looks like this: <Directory "/var/www/html/data">

Post Reply