Thanks to visit codestin.com
Credit goes to github.com

Skip to content

upgrade to 22.04 from 20.04 breaks mythweb #85

@zyeborm

Description

@zyeborm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions