Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to 22.04 from 20.04 breaks mythweb #85

Open
zyeborm opened this issue Dec 26, 2022 · 7 comments
Open

upgrade to 22.04 from 20.04 breaks mythweb #85

zyeborm opened this issue Dec 26, 2022 · 7 comments

Comments

@zyeborm
Copy link

zyeborm commented Dec 26, 2022

Not sure exactly what is wrong and I've almost certainly "fixed" it badly....but.

After doing the release upgrade I was getting this when attempting to access mythweb on the mother in laws PC.

PHP Fatal error:  Uncaught Error: Undefined constant "modules_path" in
/usr/share/mythtv/mythweb/includes/class_autoload.php:19\nStack trace:\n#0
/usr/share/mythtv/mythweb/classes/Translate.php(16): autoload()\n#1
/usr/share/mythtv/mythweb/includes/class_autoload.php(18): include_once('...')\n#2 [internal function]: autoload()\n#3 /usr/share/mythtv/mythweb/includes/errors.php(116): class_exists()\n#4 [internal function]: error_handler()\n#5
/usr/share/mythtv/mythweb/includes/php_version_check.php(20): trigger_error()\n#6
/usr/share/mythtv/mythweb/includes/init.php(33): require_once('...')\n#7
/usr/share/mythtv/mythweb/mythweb.php(20): require_once('...')\n#8 {main}\n  thrown in
/usr/share/mythtv/mythweb/includes/class_autoload.php on line 19

It looks like it's running the class_autoload before it has run the defines that well define modules_path.

My "fix" for it was to edit /usr/share/mythtv/mythweb/includes/init.php
At the start of the file is

// Attempt to load up firephp if installed on the server
    @include_once('FirePHPCore/fb.php');

    require_once 'includes/errors.php';
// Lazy load the classes...
    require_once 'includes/class_autoload.php';

I changed this to

// Attempt to load up firephp if installed on the server
    @include_once('FirePHPCore/fb.php');

    require_once 'includes/errors.php';

//these should be loaded before running the class autoloader, it may be better placing these requires there as it is the bit that requires it but other things here will probably also need it
    require_once 'includes/utils.php';
    require_once 'includes/defines.php';

// Lazy load the classes...
    require_once 'includes/class_autoload.php';

and it seems to work.

I'm putting this here rather than a pull in hopes google finds it and hence others do too if they need it. Also I'm at my mother in laws place over xmas and getting all that chooching would be a giant pain. Sorry to whomever picks this one up.

@waltonbruce
Copy link

A new apt upgrade to fixes/32 on ubuntu-22.04 (jammy) now breaks mythweb, for installations where it had been working previously. The error is the same.

[Fri Jan 06 09:42:34.347807 2023] [php:error] [pid 1341] [client 192.168.88.20:39004] PHP Fatal error: Uncaught Error: Undefined constant "modules_path" in /usr/share/mythtv/mythweb/includes/class_autoload.php:19\nStack trace:\n#0 /usr/share/mythtv/mythweb/classes/Translate.php(16): autoload()\n#1 /usr/share/mythtv/mythweb/includes/class_autoload.php(18): include_once('...')\n#2 [internal function]: autoload()\n#3 /usr/share/mythtv/mythweb/includes/errors.php(116): class_exists()\n#4 [internal function]: error_handler()\n#5 /usr/share/mythtv/mythweb/includes/php_version_check.php(20): trigger_error()\n#6 /usr/share/mythtv/mythweb/includes/init.php(33): require_once('...')\n#7 /usr/share/mythtv/mythweb/mythweb.php(20): require_once('...')\n#8 {main}\n thrown in /usr/share/mythtv/mythweb/includes/class_autoload.php on line 19, referer: http://pvr.local/mythweb/tv/upcoming

This was not an issue before recently updating. I am running
mythweb/jammy,now 2:32.0+fixes.202301051905.e677dd354f~ubuntu22.04.1

This was working fine just the other day, anyone please help me figure out a fix? I'm not wise to the layers of PHP module loading. Looks like the default PHP on this box is 8.1.

Thanks to OP, but the mother-in-law patch seems to create other problems for me.

@zyeborm
Copy link
Author

zyeborm commented Jan 7, 2023

What other issues did you have with that change?

@zyeborm zyeborm closed this as completed Jan 7, 2023
@zyeborm zyeborm reopened this Jan 7, 2023
@waltonbruce
Copy link

it intoduces an error in php_version_check, for some reason can't seem to find the mysql extension anymore (which is installed and was working until 1/5/2023 update).

Also throws an undefined function error in footer.php after that.

I've been trying to figure out what changed, I only did an apt upgrade with fixes/32 in my sources.list.
Packages php-mythtv and mythweb were both updated, but I haven't been able to figure out which files changed exactly if any.
Everything had been working fine previously.

@zyeborm
Copy link
Author

zyeborm commented Jan 7, 2023 via email

@waltonbruce
Copy link

waltonbruce commented Jan 10, 2023

So I finally fixed this by removing and installing package 'php8.1-mysql'. Some other upstream update must have disabled this PHP module. By reinstalling it I appear to have triggered other downstream post-install steps in apache2 modules etc. etc.

Not a bug for me anymore. I did not change any delivered mythweb PHP as above.

thanks

@zyeborm
Copy link
Author

zyeborm commented Jan 11, 2023 via email

@waltonbruce
Copy link

I neglected to point out clearly that on top of vanilla ubuntu 22.04 "jammy", during this episode I have had these repos in my apt sources list.

https://ppa.launchpadcontent.net/ondrej/php/ubuntu
https://ppa.launchpadcontent.net/mythbuntu/32/ubuntu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants