mythweb/php-mythtv incompatibility with PHP 5.4.x

Bug #1048121 reported by Shawn Haggett
56
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Mythbuntu
Fix Released
Medium
Mario Limonciello
mythtv (Ubuntu)
Fix Released
High
Unassigned
Quantal
Fix Released
Undecided
Unassigned
Raring
Fix Released
High
Unassigned

Bug Description

After updating to the 12.10 development release, I can no longer use mythweb, any attempt to visit th emythweb page results in the following warning + error in my apache logs:

[Sun Sep 09 15:03:04 2012] [error] [client x.x.x.x] PHP Warning: Unknown: function '0' not found or invalid function name in Unknown on line 0
[Sun Sep 09 15:03:04 2012] [error] [client x.x.x.x] PHP Fatal error: Call-time pass-by-reference has been removed in /usr/share/mythtv/bindings/php/MythBase.php on line 50

This appears to be a known issue upstream in MythTV ticket #10504 at: http://code.mythtv.org/trac/ticket/10504

My php version:
~# php --version
PHP 5.4.6-1ubuntu1 (cli) (built: Aug 22 2012 21:13:52)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

The reported file from the apache error belongs to php-mythtv on Ubuntu:
~# dpkg-query -S /usr/share/mythtv/bindings/php/MythBase.php
php-mythtv: /usr/share/mythtv/bindings/php/MythBase.php

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mythtv (Ubuntu):
status: New → Confirmed
Revision history for this message
Ulf Rompe (rompe) wrote :

Upstream bug with patch is here: http://code.mythtv.org/trac/ticket/10504

Revision history for this message
Thomas Mashos (tgm4883) wrote :

Can someone test the 0.26 repository on quantal and see if the issue persists? You should be able to enable it via the mythbuntu control centre. http://www.mythbuntu.org/repos

Changed in mythtv (Ubuntu):
assignee: nobody → Thomas Mashos (tgm4883)
importance: Undecided → High
Revision history for this message
mathieg2 (graeme-salsaholics) wrote :

I'm not running mythbuntu - I'm running ubuntu 12.10 with mythtv installed - so I was unable to install the mythbuntu-repos package.

However, I was able to run sudo add-apt-repository ppa:mythbuntu/0.26.

About to try mythweb to see what happens.

Revision history for this message
mathieg2 (graeme-salsaholics) wrote :

ok - had some initial problems upgrading the database to 0.26 - but once installed, mythweb is working perfectly.

Revision history for this message
odror (ozdror) wrote :

I have the same issue with ubuntu 12.10. Any workaround. It is possible to downgrade php?

Revision history for this message
Drumz (drumz) wrote :

I am experiencing the same errors. Applying the patches in listed MythTV ticket works for me. A new update to MythWeb was just pushed out a day or two ago which broke my install again - I had to go back and reapply the patches again.

Can someone please incorporate the patches into the package? I think there's numerous people out there affected by this that would greatly appreciate it.

Thanks!
(Running Ubuntu 12.10 with the MythTV packages installed.)

Revision history for this message
Chuck Smith (smith.chuck) wrote :

Seconding what Drumz notes. The upstream patches also work great when applied to my system (Ubuntu 12.10 w/ current MythTV). This is a major problem within the context of the mythweb package since basically every upgraded release re-breaks the behavior. Obviously, a downgrade of PHP is out of the question, but maybe you could incorporate this particular upstream patch set into any further 12.10 mytweb rebuilds that take place? Sorry that I'm not super clear on how the specifics of this work, but I'm guessing that's an easier change to manage than backporting all the 0.26 myth releases to Ubuntu 12.10... If I can assist in any way, please give a shout!

Revision history for this message
Thomas Mashos (tgm4883) wrote :

@Drumz - We only carry a very minimum set of patches to what upstream does. If upstream backports that fix to 0.25, then our builds will get it automatically. As it's fixed in 0.26, and 0.26 is available for 12.10, you can always upgrade. If you would like to stick with 0.25, then you will need to continue to fix it (unless upstream backports the fix). There shouldn't be that many 0.25 builds happening anymore as the dev version is 0.27 now.

@Chuck Smith - We already provide 0.26 builds for 12.10 via http://www.mythbuntu.org/repos

Changed in mythtv (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Drumz (drumz) wrote :

From what I can see, 0.25 is the latest version 'natively' supplied for 12.10. To get 0.26 I'd have to go the ppa route to get it (which I do see 12.10 listed as supported).

So I'm a bit baffled why such a simple known (show stopping) bug can remain when it's the latest natively available - many people won't necessary know, or want to do deal with going the ppa route. From an end user perspective the expectation would be for such a simple (show stopping) bug to get quickly fixed and not have to go some other route and incur the hassle of an update to the next major version just to get the fix.

Thanks for responding, though knowing what the status is helps some!

Revision history for this message
Thomas Mashos (tgm4883) wrote :

Assigning superm1 to look at the feasibility of backporting and carrying a patch to fix this http://code.mythtv.org/trac/ticket/10504

Changed in mythbuntu:
status: New → Confirmed
assignee: nobody → Thomas Mashos (tgm4883)
importance: Undecided → Medium
assignee: Thomas Mashos (tgm4883) → Mario Limonciello (superm1)
Revision history for this message
Shawn Haggett (podge-9) wrote :

The TL;DR for the below. To upgrade to the released 0.26 version for 12.10 mentioned in #9 you need to (note, this was done on a fairly recent clean install of 12.10 server amd64, although with a restored db backup from an old 0.25 install that had blown a disk, so the db was already populated):
1) Run: 'sudo add-apt-repository ppa:mythbuntu/0.26'
2) run 'sudo apt-get update; apt-get upgrade'
3) To fix the error in the update, edit the file at /var/lib/dpkg/info/mythtv-database.postinst, and around line 71 on, hardcode in your database name and mythtv username/password for the db (ref: http://www.mythtv.org/pipermail/mythtv-users/2012-October/340757.html)
4) Run: 'sudo dpkg --configure mythtv-database' and confirm the install finishes.
5) Finish updating any other components that didn't update above.
6) Edit /etc/mythtv/config.xml and ensure the settings match those in /etc/mythtv/mysql.txt. Myth no longer uses the mysql.txt file, but the updater doesn't seem to copy the settings over to the config.xml correctly.
7) Mythweb ends up broken and not loading. It got late by this point and I stopped trying to get it working.

Option 2:
1) Go to: http://code.mythtv.org/trac/ticket/10504 and look at the patches there.
2) Manually apply the few lines of changes to your files.
3) Have working system.

Ok, so I've attempted to update to 0.26 (I wasn't aware this is the currently supported version, I had assumed the latest version would come from the normal repos). After looking at the mythbuntu site in #9, the only install option that seemed obvious on that page was to install mythbuntu-control-centre and choose the version I wanted. When I looked at installing it, it wanted to pull in a bunch of X and python packages. Now I don't have a big concern about python, but pulling in a bunch of X seems silly on a headless server machine, just to select a repo.

Looking around it was hard to be certain exactly which ppa I needed to enable, so I went with what is mentioned in #4 and managed to add what I think is the correct PPA. Now I seem to have hit the DB update issue mentioned in #5. To fix that I had to google to eventually find a thread from the mythtv-users mailing list that points out where the postinst script is for the mythtv-database package that breaks. For reference, page is at: http://www.mythtv.org/pipermail/mythtv-users/2012-October/340757.html
Although I only had to change the database name, username and password, not all the values mentioned in that that.

Then the mythtv-backend service wouldn't start up with an error about being unable to access the database. Luckly in my previous googling I noticed something about the mysql.txt file being deprecated in 0.26, and it instead reads the config from the config.xml file. So I checked /etc/mythtv/config.xml and /etc/mythtv/mysql.txt and found they had different settings. After copying over the correct password, and setting the host, db and user names, the backend will finally startup. However mythweb is still returning me errors and wont load. However, after also updating my frontend machine, I can at least record/watch shows and it's getting late, so I'm stopping here.

Revision history for this message
Thomas Mashos (tgm4883) wrote :

I've been talking to upstream and they are at least looking at the possibility of backporting the fix to 0.25.

@Shawn Haggett (podge-9) - The reason you ran into the issue with mythtv-database is that the information in /etc/mythtv/config.xml was incorrect (I'm assuming due to your restore from an old DB to a fresh install, but IDK). This issue has been fixed for quite some time now (see https://github.com/MythTV/packaging/blob/master/deb/debian/mythtv-database.config ). Looking at your #6 would seem to confirm this. This is also likely the same cause of the issue with mythweb, as it has it's own information for where the backend is and what credentials to use.

Revision history for this message
Kevin Dalley (nereocystis) wrote :

It's now March. This patch should be integrated into mythweb. Mythweb is broken, and badly broken. I just upgraded my mythtv system yesterday, and was suprised to find this problem.

Revision history for this message
Mario Limonciello (superm1) wrote :

We're not backporting it to 0.25, upgrade to 0.26. We've got a PPA available.

Changed in mythbuntu:
status: Confirmed → Fix Released
Revision history for this message
Kevin Dalley (nereocystis) wrote :

As has been mentioned, that is a bad response. I used to maintain many Debian packages. The goal is to have a working package. Since the 2012.10 mythweb is broken, it should be fixed in 2012.10. This is not just a bug, the package is unusable.

Revision history for this message
Kevin Dalley (nereocystis) wrote :

This should be changed back to confirmed. It is not fixed in a released package.

Revision history for this message
Drumz (drumz) wrote :

I fully agree with Kevin. As I previously pointed out, the OFFICIAL release is 0.25 WITHOUT going to a PPA. This is a flat out busted, show stopping bug. And the patch is really simple.

Expecting the average user to have to go to the PPA version is bad. Not to mention if they have multiple MythTV boxes now they have to do that to ALL of them. To mark this as 'Fix Released' is *not* true.

Revision history for this message
Thomas Mashos (tgm4883) wrote :

Even if this was fixed by the Mythbuntu team, it would go to the 0.25 PPA, not the Ubuntu repos.

Revision history for this message
Mario Limonciello (superm1) wrote :

We have a team policy of not backporting things to the ubuntu packages that upstream doesn't deem should be backported to that stable release series. If upstream backports it to 0.25.x then we'll pull it into our 0.25.x packages from them.

Changed in mythtv (Ubuntu Quantal):
status: New → Won't Fix
Changed in mythtv (Ubuntu Raring):
assignee: Thomas Mashos (tgm4883) → nobody
Revision history for this message
Drumz (drumz) wrote :

Thank you for the insight and more properly setting the status.

While I can possibly understand not backporting some willy nilly patch for something that's a nuisance but has work arounds or is livable with. But in this case it's a show stopper - it flat out won't work without the patches which should be justification for backporting.

Revision history for this message
Kevin Dalley (nereocystis) wrote :

I agree with Drumz here. I appreciate marking this as won't fix, but it would be even better to fix it.

I applied the patch to my machine. Of course, I had to search around a bit to find out why there was a failure.

I assume that the mythtv team expect that this release is not used with the newer PHP. Since Ubuntu uses the newer PHP, then patching it is reasonable.

Revision history for this message
Mario Limonciello (superm1) wrote : Re: [Bug 1048121] Re: mythweb/php-mythtv incompatibility with PHP 5.4.x

I understand the point, but I still stand by that point needs to be driven
upstream. Once it's there and available for all users we are helping the
better mythtv population and not just Ubuntu.
On Mar 21, 2013 6:25 PM, "Drumz" <email address hidden> wrote:

> Thank you for the insight and more properly setting the status.
>
> While I can possibly understand not backporting some willy nilly patch
> for something that's a nuisance but has work arounds or is livable with.
> But in this case it's a show stopper - it flat out won't work without
> the patches which should be justification for backporting.
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1048121
>
> Title:
> mythweb/php-mythtv incompatibility with PHP 5.4.x
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mythbuntu/+bug/1048121/+subscriptions
>

Revision history for this message
Kevin Dalley (nereocystis) wrote :

I'm confused. What you are saying that it is better to have Ubuntu completely broken, than to apply a patch which has not yet been accepted upstream in 0.25.

Revision history for this message
Thomas Mashos (tgm4883) wrote :

I'm currently (again) discussing with upstream on whether this will get a backport or not.

Revision history for this message
Kevin Dalley (nereocystis) wrote :

I submitted a 0.25 ticket request this patch:

http://code.mythtv.org/trac/ticket/11463

Revision history for this message
Kevin Dalley (nereocystis) wrote :

Thanks. I do understand the frustration when dealing with upstream authors. When I was a maintainer, I preferred as few patches as possible. However, sometimes I had to add patches, then send them upstream.

Revision history for this message
Kevin Dalley (nereocystis) wrote :

Bug now fixed in upstream 0.25. Here's the mythtv bug which has been closed.

http://code.mythtv.org/trac/ticket/11463

Thomas Mashos (tgm4883)
Changed in mythtv (Ubuntu Quantal):
status: Won't Fix → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.