You are not logged in.

#1 2017-01-22 13:53:35

MickeyRat
Member
Registered: 2011-11-15
Posts: 91

[SOLVED] Mythweb not working after PHP 7.1.1 upgrade

After I upgraded to PHP 7.1.1, mythweb quit working.  I've reworked the php.conf, http.conf and mythweb.conf files and I haven't been able to get it working.  I get the following error:

Fatal error: Cannot use $this as parameter in /var/lib/mythtv/mythweb/includes/utils.php on line 218

The following is the code in /var/lib/mythtv/mythweb/includes/utils.php at liine 218

    function _or($this, $or_this, $gt = false) {
        if ($gt === true)
            return $this > 0 ? $this : $or_this;
        if (!empty($gt))
            return $this > $gt ? $this : $or_this;
        return $this ? $this : $or_this;
    }

I make no claim to be a webmaster but, I was able to get this working before.  Any ideas?

Last edited by MickeyRat (2017-01-22 20:10:35)


Some cause happiness wherever they go; others whenever they go.
- Oscar Wilde

Offline

#2 2017-01-22 13:59:57

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 16,298
Website

Re: [SOLVED] Mythweb not working after PHP 7.1.1 upgrade

Offline

#3 2017-01-22 14:47:41

MickeyRat
Member
Registered: 2011-11-15
Posts: 91

Re: [SOLVED] Mythweb not working after PHP 7.1.1 upgrade

Trilby wrote:

Thanks for the reply.  You're probably right which means I'll have to downgrade PHP till the next mythweb upgrade.  I'll leave it alone in the hope that someone has another solution but, I have promised my wife I'll get it back before the end of the day.  So, I can't wait very long smile

Last edited by MickeyRat (2017-01-22 14:48:19)


Some cause happiness wherever they go; others whenever they go.
- Oscar Wilde

Offline

#4 2017-01-22 20:10:10

MickeyRat
Member
Registered: 2011-11-15
Posts: 91

Re: [SOLVED] Mythweb not working after PHP 7.1.1 upgrade

Well I put it of as long as I could.  I've taken php and php-apache back to 7.0.14-1 and mythweb is working fine.  I'll be looking for a new release of mythweb to take them out of pacman.conf.

Not the solution I was hoping for but, I guess this one is solved.


Some cause happiness wherever they go; others whenever they go.
- Oscar Wilde

Offline

#5 2017-01-23 20:15:39

geekinthesticks
Member
From: England
Registered: 2011-09-21
Posts: 119
Website

Re: [SOLVED] Mythweb not working after PHP 7.1.1 upgrade

I had this problem too! When I downgraded apache-php and php apache moaned that it couldn't find libreadline.so.6 so I bodged it by doing:

sudo ln -s /usr/lib/libreadline.so.7 /usr/lib/libreadline.so.6

Yes, this is a horrible hack which I'll probably regret at some time, but at least I can now program the TV.

Offline

#6 2017-01-24 08:53:26

JDGBOLT
Member
Registered: 2017-01-24
Posts: 2

Re: [SOLVED] Mythweb not working after PHP 7.1.1 upgrade

I managed to fix it for that code in question by changing $this to $that. PHP 7.1 disallows the use of $this for a parameter now, so that particular code was tripping it. Also submitted a bug report to the bug tracker for mythtv so hopefully it'll be fixed at some point.

Offline

#7 2017-01-26 18:28:13

produnis
Member
From: Germany
Registered: 2014-09-29
Posts: 32

Re: [SOLVED] Mythweb not working after PHP 7.1.1 upgrade

@JDGBOLT
Could you please say which files you changed,
or could you please give a link to your bugtracker-report

EDIT: stupid me, it is file "/var/lib/mythtv/mythweb/includes/utils.php", and I can confirm that replacing all "$this" with "$that" in that file solves the problem

Last edited by produnis (2017-01-26 18:33:56)

Offline

Board footer

Powered by FluxBB