[Solved] Mythweb broken after upgrade to Ubuntu 18.04.1

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

Moderator: Forum Moderators

Post Reply
robfish
Newcomer
Posts: 6
Joined: Tue Sep 06, 2016 11:10 pm
New Zealand

[Solved] Mythweb broken after upgrade to Ubuntu 18.04.1

Post by robfish »

I took the plunge (to Ubuntu 18.04.1) and most seems fine (on my MythBuntu server) except mythweb

To get Apache to restart (without mythweb) I had to edit
/etc/apache2/sites-enabled/mythweb.conf
with the following:

#these lines commented by Robert
# php_value file_uploads 0
# php_value allow_url_fopen On
# php_value zlib.output_handler Off
# php_value memory_limit 64M
# php_value max_execution_time 30
# php_value display_startup_errors On
# php_value display_errors On

Any help appreciated on what to do to get Mythweb working again.
I have tried:-
sudo apt purge php-mythtv
and
sudo apt-get purge mythweb
(then reinstalling them) but still the same problem. Could be another problem created with the PHP upgrade?
User avatar
bill6502
Developer
Posts: 2323
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythweb broken after upgrade to Ubuntu 18.04.1

Post by bill6502 »

I don't use mythweb, but have it running (without commenting out the above.)

Try: dpkg -l | grep libapache2-mod-php7.2

I have that installed and enabled. Also, try looking in /var/log/apache2/error.log
robfish
Newcomer
Posts: 6
Joined: Tue Sep 06, 2016 11:10 pm
New Zealand

Re: Mythweb broken after upgrade to Ubuntu 18.04.1

Post by robfish »

When I uncomment those lines again I get errors when I restart Apache. If I leave the lines uncommented I get a new error when I comment them out one at a time.
The first one is.....
Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration

Reading state information... Done
libapache2-mod-php7.2 is already the newest version (7.2.7-0ubuntu0.18.04.2)

How can I tell if it is "enabled"
User avatar
bill6502
Developer
Posts: 2323
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythweb broken after upgrade to Ubuntu 18.04.1

Post by bill6502 »

Mine are in: /etc/apache2/mods-enabled

See: a2enmod if there isn't a link there to mods-available.
yawlhoo
Senior
Posts: 120
Joined: Wed Apr 15, 2015 4:18 pm
United States of America

Re: Mythweb broken after upgrade to Ubuntu 18.04.1

Post by yawlhoo »

I did this upgrade and fixed my Mythweb problems by running:

sudo a2enmod php7.2

I then had to edit:

/usr/share/mythtv/mythweb/modules/tv/recorded.php

and put quotes around disk_size and disk_used at lines 188,189. Then I ran:

sudo systemctl restart apache2

Hope this helps.
User avatar
bill6502
Developer
Posts: 2323
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythweb broken after upgrade to Ubuntu 18.04.1

Post by bill6502 »

The quotes mentioned above were fixed in: https://github.com/MythTV/mythweb/commit/664dc17
in May 2018.

Thanks for mentioning restarting apache2
yawlhoo
Senior
Posts: 120
Joined: Wed Apr 15, 2015 4:18 pm
United States of America

Re: Mythweb broken after upgrade to Ubuntu 18.04.1

Post by yawlhoo »

Maybe that fix hasn't yet propagated to the Mythbuntu updates repository I use. I also see at the top of Recording Schedules:

Warning at /usr/share/mythtv/mythweb/modules/tv/classes/Schedule.php, line 106:
!!NoTrans: count(): Parameter must be an array or an object that implements Countable!!

But since this is "just" a warning, Mythweb still works.
robfish
Newcomer
Posts: 6
Joined: Tue Sep 06, 2016 11:10 pm
New Zealand

Re: Mythweb broken after upgrade to Ubuntu 18.04.1

Post by robfish »

Thanks,
sudo a2enmod php7.2
then a restart
sudo systemctl restart apache2
Did the trick.
robfish
Newcomer
Posts: 6
Joined: Tue Sep 06, 2016 11:10 pm
New Zealand

Re: Mythweb broken after upgrade to Ubuntu 18.04.1

Post by robfish »

My lines (187-189) look like this:-

// This is inaccurate, but it's the best we can get without GMP.
define(disk_size, ($size * 1024));
define(disk_used, ($used * 1024));

What should they be changed to?
User avatar
bill6502
Developer
Posts: 2323
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythweb broken after upgrade to Ubuntu 18.04.1

Post by bill6502 »

Take a look at the link 3 posts above your last one.
Four lines get changed.
robfish
Newcomer
Posts: 6
Joined: Tue Sep 06, 2016 11:10 pm
New Zealand

Re: Mythweb broken after upgrade to Ubuntu 18.04.1

Post by robfish »

bill6502 wrote:
Mon Aug 27, 2018 1:52 am
Take a look at the link 3 posts above your last one.
Four lines get changed.
Thanks. That did it.
Post Reply