Opened 3 years ago

Closed 11 months ago

Last modified 11 months ago

#13255 closed Bug Report - General (Fixed)

mythweb Xubuntu 18.04

Reported by: Mike Bibbings <mike.bibbings@…> Owned by: David Hampton
Priority: minor Milestone: 31.0
Component: Packaging Version: v29-fixes
Severity: low Keywords: mythweb
Cc: Ticket locked: no

Description

File 20-mythweb.ini on Xubuntu 18.04 should be installed in /etc/php/7.2/apache2/conf.d/ it gets installed in /etc/php/7.0/apache2/conf.d/

This results in "Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0"

for http://localhost/mythweb/settings/tv/channels when saving changes.

mythweb version 2:29.1+fixes.20180220.9b7b962-0ubuntu3 from bionic/multiverse repository

Attachments (1)

mythweb.packaging.0.patch (514 bytes) - added by Bill Meek 11 months ago.
From the notes in mythweb.conf, Apache earlier than 2.2 would fail with this solution. My 18.04 host is v2.4

Download all attachments as: .zip

Change History (11)

comment:1 Changed 13 months ago by Mike Bibbings

Just to add

Ubuntu 19.10 uses php 7.3, as does Debian/Raspbian? Buster(10), so install to /etc/php/7.3/apache2/conf.d/ is required.

Ubuntu 20.04 daily build currently has php 7.3 but is likely to move to php 7.4 before release (April 2020).

comment:2 Changed 11 months ago by Bill Meek

Status: newinfoneeded_new

Mike,

1st, I changed all of my /etc/phpX/... files that had max_input_vars to 1000.

Then made the change in: /etc/apache2/sites-available/mythweb.conf:

        # If you have a large number of channels, you may need to increase this
        # value to prevent PHP from running out of memory.
            php_value max_input_vars                10000 <---------
            php_value memory_limit                  512M
            php_value max_execution_time            30

Restarted apache2.service and changed a single channel OK. Repeated with the above set to 400 and couldn't find the error message, but the change didn't take.

Would this be acceptable? It would eliminate the need to change the values in /etc/phpX/... every time a new version of php comes out.

comment:3 Changed 11 months ago by Mike Bibbings

Bill,

That is a much better way

ran up Xubuntu 18.04 in a VM

installed default (original 0.29 release from Ubuntu repo) mythtv and mythweb

added two VBOX DVB-S/S2 network tuners (over 800 channels in mythconverg channel table) confirmed error in mythweb max vars exceeed 1000

applied one line change php_value max_input_vars 30000 to /etc/apache2/sites-available/mythweb.conf no error in mythweb

added ppa:mythbuntu/0.29 no errors in mythweb (change to /etc/apache2/sites-available/mythweb.conf has persisted over upgrade)

added ppa:mythbuntu/30 no errors in mythweb (change to /etc/apache2/sites-available/mythweb.conf has persisted over upgrade)

added ppa:mythbuntu/31 no errors in mythweb (change to /etc/apache2/sites-available/mythweb.conf has persisted over upgrade)

Also tried on another test backend built from source with 432 channels using max_input_vars 10000 which worked correctly.

Notes:

in /etc/apache2/sites-available/mythweb.conf php_value memory_limit is 64M not the 512M in your code snippet.

max_input_vars 10000 allows for up to 620 channels in mythconverg channel table. I usually set to 30000 due to my configuration of both DVB-T/T2 and DVB-S/S2

Mike

Changed 11 months ago by Bill Meek

Attachment: mythweb.packaging.0.patch added

From the notes in mythweb.conf, Apache earlier than 2.2 would fail with this solution. My 18.04 host is v2.4

comment:4 Changed 11 months ago by Bill Meek

Note:

Get existing PHP version with: php -r 'echo PHP_MAJOR_VERSION,".", PHP_MINOR_VERSION;'

comment:5 Changed 11 months ago by Mike Bibbings

Bill,

Applied mythweb.packaging.0.patch to packaging master on Debian Buster in a VM and it works after applying two patches from ticket https://code.mythtv.org/trac/ticket/13469 to allow the debs to be built.

The orignal patch for .clang-tidy plus a patch I have just added to the ticket for packaging/deb/debian/patches/default_directories, due to latest code modernisation changes, specifically Tidy: Use the auto type specifier instead of duplicating types. (plug……ins) commit 0c79cdb9

Mike

comment:6 Changed 11 months ago by David Hampton

Owner: set to David Hampton
Status: infoneeded_newassigned

comment:7 Changed 11 months ago by Bill Meek

I'm looking at a solution that keeps the previous work done by Mario Limonciello, this is just one of the changes:

diff --git a/deb/debian/mythweb.postinst b/deb/debian/mythweb.postinst
index c015132..d5ba898 100755
--- a/deb/debian/mythweb.postinst
+++ b/deb/debian/mythweb.postinst
@@ -214,8 +214,9 @@ s/^.*\(setenv\sdb_password\s\+\"\).*\"/\t\1$mythtv_password\"/g;
             reload_apache
 
             #migrate to php7 if need be
+            CURRENT_PHP_VERSION=$(php -r 'echo PHP_MAJOR_VERSION,".", PHP_MINOR_VERSION;')
             if [ -f /etc/php5/apache2/conf.d/20-mythweb.conf ] && \
-               [ -d /etc/php/7.0/apache2/conf.d ]; then
+               [ -d /etc/php/${CURRENT_PHP_VERSION}/apache2/conf.d ]; then
                     mv_conffile /etc/php5/apache2/conf.d/20-mythweb.ini /etc/php/7.0/apache2/conf.d/20-mythweb.ini 2:0.28.0+fixes.20160325.2520617-0ubuntu3~
             fi
         fi

It's not clear why the old code relies on /etc/php5/apache2/conf.d/20-mythweb.ini.

Dave, I'll take the ticket if you like.

comment:8 Changed 11 months ago by Bill Meek

Mike, do you think the above would care for the case where 20.04 switches from PHP 7.3 to 7.4?

comment:9 Changed 11 months ago by David Hampton

Milestone: needs_triage31.0
Resolution: Fixed
Status: assignedclosed

Applies to packaging 29/30/master. Ubuntu 16.04 which was the support base for 29/30 has apache 2.4.18.

comment:10 Changed 11 months ago by David Hampton

Oops. Hadn't seen your last comments before closing. Feel free to take over the ticket if you like.

Note: See TracTickets for help on using tickets.