Mailing List Archive

Re: Mythweb errors on new build (solved)
On 1/8/2023 11:25 AM, Donald Brett via mythtv-users wrote:
> Just finished building an new box with Ubuntu-Mate-22.04, installed
> latest mythtv (frontend/backend - fixes/32 (v32.0+fixes)), and
> migrated mythconverg from an Ubuntu-Mate-20.04 box.  Everything went
> pretty well, except a couple of items.
>
> After installing mythweb, I discovered that php wasn't installed, so
> installed it, but getting this error.
>
> *Fatal error*: Uncaught Error: Undefined constant "modules_path" in
> /usr/share/mythtv/mythweb/includes/class_autoload.php:19 Stack trace:
> #0 /usr/share/mythtv/mythweb/classes/Translate.php(16): autoload() #1
> /usr/share/mythtv/mythweb/includes/class_autoload.php(18):
> include_once('...') #2 [internal function]: autoload() #3
> /usr/share/mythtv/mythweb/includes/errors.php(116): class_exists() #4
> [internal function]: error_handler() #5
> /usr/share/mythtv/mythweb/includes/php_version_check.php(20):
> trigger_error() #6 /usr/share/mythtv/mythweb/includes/init.php(33):
> require_once('...') #7 /usr/share/mythtv/mythweb/mythweb.php(20):
> require_once('...') #8 {main} thrown
> in*/usr/share/mythtv/mythweb/includes/class_autoload.php*on line*19*
>
> Using Stephen's guidance from an earlier thread:
>
> sudo apt list --installed | grep -i php
> libapache2-mod-php8.1/jammy-updates,now 8.1.2-1ubuntu2.9 amd64
> [installed,upgradable to: 8.1.14-1+ubuntu22.04.1+deb.sury.org+1]
> ....and several similar lines.
>
> sudo a2query -m | grep -i php
> php8.1 (enabled by maintainer script)
>
>
> It looks like I have the correct versions, what else should I look for?
>
> Don
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
> Virus-free.www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>
>
> <about:blank?compose#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> _______________________________________________
> 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
I tried removing mythweb, php, apache, then rebooting.  Then reinstalled
apache2, php, and mythweb.  Got the same errors when running mythweb,
but slightly different results when checking the versions:

don@johnny:~$ sudo apt list --installed | grep -i php

WARNING: apt does not have a stable CLI interface. Use with caution in
scripts.

libapache2-mod-php8.1/jammy-updates,now 8.1.2-1ubuntu2.9 amd64
[installed,upgradable to: 8.1.14-2+ubuntu22.04.1+deb.sury.org+1]
libapache2-mod-php8.2/now 8.2.1-1+ubuntu22.04.1+deb.sury.org+1 amd64
[installed,upgradable to: 8.2.1-2+ubuntu22.04.1+deb.sury.org+1]
php-common/jammy,jammy,now 2:92ubuntu1 all [installed,upgradable to:
2:93+ubuntu22.04.1+deb.sury.org+2]
php-mysql/jammy,jammy,now 2:8.2+93+ubuntu22.04.1+deb.sury.org+2 all
[installed,automatic]
php-mythtv/now 2:32.0+fixes.202301051905.e677dd354f~ubuntu22.04.1 all
[installed,upgradable to:
2:32.0+fixes.202301091618.e677dd354f~ubuntu22.04.1]
php8.1-cli/jammy-updates,now 8.1.2-1ubuntu2.9 amd64
[installed,upgradable to: 8.1.14-2+ubuntu22.04.1+deb.sury.org+1]
php8.1-common/jammy-updates,now 8.1.2-1ubuntu2.9 amd64
[installed,upgradable to: 8.1.14-2+ubuntu22.04.1+deb.sury.org+1]
php8.1-opcache/jammy-updates,now 8.1.2-1ubuntu2.9 amd64
[installed,upgradable to: 8.1.14-2+ubuntu22.04.1+deb.sury.org+1]
php8.1-readline/jammy-updates,now 8.1.2-1ubuntu2.9 amd64
[installed,upgradable to: 8.1.14-2+ubuntu22.04.1+deb.sury.org+1]
php8.1/jammy-updates,jammy-updates,now 8.1.2-1ubuntu2.9 all
[installed,upgradable to: 8.1.14-2+ubuntu22.04.1+deb.sury.org+1]
php8.2-cli/now 8.2.1-1+ubuntu22.04.1+deb.sury.org+1 amd64
[installed,upgradable to: 8.2.1-2+ubuntu22.04.1+deb.sury.org+1]
php8.2-common/now 8.2.1-1+ubuntu22.04.1+deb.sury.org+1 amd64
[installed,upgradable to: 8.2.1-2+ubuntu22.04.1+deb.sury.org+1]
php8.2-mysql/now 8.2.1-1+ubuntu22.04.1+deb.sury.org+1 amd64
[installed,upgradable to: 8.2.1-2+ubuntu22.04.1+deb.sury.org+1]
php8.2-opcache/now 8.2.1-1+ubuntu22.04.1+deb.sury.org+1 amd64
[installed,upgradable to: 8.2.1-2+ubuntu22.04.1+deb.sury.org+1]
php8.2-readline/now 8.2.1-1+ubuntu22.04.1+deb.sury.org+1 amd64
[installed,upgradable to: 8.2.1-2+ubuntu22.04.1+deb.sury.org+1]
php8.2/now 8.2.1-1+ubuntu22.04.1+deb.sury.org+1 all
[installed,upgradable to: 8.2.1-2+ubuntu22.04.1+deb.sury.org+1]
php/jammy,jammy,now 2:8.2+93+ubuntu22.04.1+deb.sury.org+2 all [installed]
don@johnny:~$

don@johnny:~$ sudo a2query -m | grep -i php
php8.2 (enabled by site administrator)
php8.1 (enabled by maintainer script)
don@johnny:~$

On closer inspection of /var/log/apache2/error.log, there's an error
about the version check (Undefined constant "FATAL" in
/var/www/html/php_version_check.php).  That leads back to the earlier
suggestion, from the other thread, to adjust apache2 (adapted to the
currently installed versions), by:

sudo a2dismod php8.1
sudo a2enmod php8.2
sudo systemctl restart apache2

Now Mythweb works fine.

--
This email has been checked for viruses by Avast antivirus software.
www.avast.com