Results 1 to 10 of 14

Thread: 12.10 MythWEb PHP Fatal Error

Hybrid View

  1. #1
    Join Date
    Jan 2008
    Beans
    Hidden!

    12.10 MythWEb PHP Fatal Error

    I'm posting this in the event it can be useful to someone else:

    After upgrading to the latest 12.10 release, MythWeb started showing a blank page. Not finding anything on the ubuntuforums I poked around and found this:

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

    If you have the following error appearing in your /var/log/apache2/error.log:

    Code:
    [Sun Oct 21 10:08:24 2012] [error] [client 192.168.1.26] PHP Warning:  Unknown: function '0' not found or invalid function name in Unknown on line 0
    [Sun Oct 21 10:08:25 2012] [error] [client 192.168.1.26] PHP Fatal error:  Call-time pass-by-reference has been removed in /usr/share/mythtv/bindings/php/MythBase.php on line 50
    Applying the patches provided in that but thread resolved the PHP Fatal error so that MythWeb now works again.

  2. #2

    Re: 12.10 MythWEb PHP Fatal Error

    I apologize for sounding kinda NOOB on this. How exactly did you apply the patches? I'm running Myth .25 and I'm not exactly sure how to apply these patches. I'm guessing that its sudo patch original and then new file? I also can't find the MythBase either. Thanks.
    webmaster www.thefuzz4.net
    Ubuntu Saucy on every computer in my house

  3. #3
    Join Date
    Jan 2008
    Beans
    Hidden!

    Re: 12.10 MythWEb PHP Fatal Error

    There's an automated way of applying them, but I just manually edited/applied them.

    If you look at the top of the patch files, it'll show you part of the path to the file. The easiest way is to use the 'locate' command if it's been installed:

    locate MythBase.php
    /usr/share/mythtv/bindings/php/MythBase.php

    Then I just used my favorite editor to open/edit the file. The patch includes the approximate line number where you need to edit:

    *** 51,57 ****

    That gets you to the location within the file. Then just look at the lines beginning with the '!' character - the first one shows you the original, the 2nd one shows you what it needs to be changed to:

    original:
    ! Cache::setObject($this->cacheKey, &$this, $this->cacheLifetime);

    Change it to:
    ! Cache::setObject($this->cacheKey, $this, $this->cacheLifetime);

    If the lines are new (added) in the patch, they're preceeded by a '+' sign.

    For safety/sanity reasons, save a copy of the original file first. That way if you accidentally make a mistake you can get the original file back and start over.

  4. #4
    Join Date
    Nov 2006
    Location
    Wellington, New Zealand
    Beans
    15
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: 12.10 MythWEb PHP Fatal Error

    to automatically apply then just use the patch command

    Download the patch files from http://code.mythtv.org/trac/ticket/10504 to a directory on your myth backend server

    Using the --backup with the patch command will rename the original file as .php.orig so you can go back if the patch breaks something

    Code:
    sudo patch --backup /usr/share/mythtv/bindings/php/MythBase.php MythBase.php.patch
    sudo patch --backup /usr/share/mythtv/mythweb/includes/sorting.php sorting.php.patch
    sudo patch --backup /usr/share/mythtv/mythweb/modules/tv/schedules.php tv-schedules.php.patch
    sudo patch --backup /usr/share/mythtv/mythweb/modules/tv/tmpl/default/schedules.php schedules.php.patch

  5. #5
    Join Date
    Nov 2004
    Location
    California, USA
    Beans
    100
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: 12.10 MythWEb PHP Fatal Error

    Does anyone know when these patches might be incorporated into a build available within Quantal (either -proposed or -backports, probably)? As it stands, I can't update the mythtv packages without breaking mythweb, and that seems... suboptimal.

  6. #6
    Join Date
    Jan 2008
    Beans
    Hidden!

    Re: 12.10 MythWEb PHP Fatal Error

    Well, the MythWeb packages were just updated and the patches were not included. So I had to reapply all of the patches again.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •