← Back to team overview

mythbuntu-bugs team mailing list archive

[Bug 1048121] Re: mythweb/php-mythtv incompatibility with PHP 5.4.x

 

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.

-- 
You received this bug notification because you are a member of Mythbuntu
Bug Team, which is subscribed to Mythbuntu.
https://bugs.launchpad.net/bugs/1048121

Title:
  mythweb/php-mythtv incompatibility with PHP 5.4.x

Status in Mythbuntu, Ubuntu derivative focused upon MythTV:
  Confirmed
Status in “mythtv” package in Ubuntu:
  Fix Released

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/mythbuntu/+bug/1048121/+subscriptions


References