Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 2 years ago

Closed 17 months ago

#10504 closed Bug Report - General (Fixed)

mythweb incomatible with PHP 5.4.0 and later ( Call-time pass-by-reference)

Reported by: billyx@… Owned by: kormoc
Priority: minor Milestone: 0.26
Component: Plugin - MythWeb Version: Master Head
Severity: medium Keywords: Call-time pass-by-reference PHP 5.4.0
Cc: Ticket locked: yes

Description

mythweb doesn't work with PHP 5.4.0 and later because call time pass by reference is removed in PHP 5.4.0

[Sat Mar 24 22:08:52 2012] [error] [client 10.0.0.2] PHP Warning: Unknown: function '0' not found or invalid function name in Unknown on line 0
[Sat Mar 24 22:08:53 2012] [error] [client 10.0.0.2] PHP Fatal error: Call-time pass-by-reference has been removed in /usr/local/share/mythtv/binding
s/php/MythBase.php on line 50

Attachments (4)

MythBase.php.patch (581 bytes) - added by Dave Sp <davespmyth@…> 2 years ago.
sorting.php.patch (810 bytes) - added by Dave Sp <davespmyth@…> 2 years ago.
schedules.php.patch (567 bytes) - added by Dave Sp <davespmyth@…> 2 years ago.
tv-schedules.php.patch (610 bytes) - added by cooljavajoe@… 23 months ago.
The patch provided by Dave Sp on an alternative location to allow it to be effective in all templates.

Download all attachments as: .zip

Change History (32)

comment:1 Changed 2 years ago by mdean

  • Milestone 0.25 deleted
  • Priority changed from major to minor

resetting to defaults

comment:2 Changed 2 years ago by ajg02@…

OK, so Debian testing has updated to php 5.4 and now mythweb no longer works for me due to this bug.

comment:3 Changed 2 years ago by Dave Sp <davespmyth@…>

This hit me, too. I patched three files to resolve this, which I will attach. These patches have only been tested against PHP 5.4.0, and I do not know if they introduce any memory leaks.

Changed 2 years ago by Dave Sp <davespmyth@…>

Changed 2 years ago by Dave Sp <davespmyth@…>

Changed 2 years ago by Dave Sp <davespmyth@…>

comment:4 Changed 2 years ago by Dave Sp <davespmyth@…>

Oh, and this is against the 0.24-fixes code, not 0.25.

comment:5 Changed 2 years ago by hodosiszabolcs@…

Feedback:

Sir,
Your patches contains no changes, before and after code are identical. Applying your patches of course did not solve the issue.

Szabi
hodosiszabolcs@…

comment:6 Changed 2 years ago by ajg02@…

The patches do contain changes and they do work for me. Thanks Dave Sp.

comment:7 Changed 2 years ago by nelsonbt2001@…

Manually applied the same changes to my debian-unstable setup.

I was able to get in and see the back-end status, upcoming recordings, delete recordings, schedule new recordings, etc.

Thanks Dave Sp.

comment:8 Changed 2 years ago by hodosiszabolcs@…

Sorry about wasting your time, it was my fault. Yes it's working.

comment:9 Changed 2 years ago by billyx@…

Works for me with 0.25. Thank you, Dave!

comment:10 Changed 2 years ago by tino@…

Thank you for these patches. They make my MythWeb work again on Debian Unstable.

I don't know if this is related, but I still get some error messages when I view program details after searching:

Warning at /usr/share/mythtv/mythweb/modules/tv/detail.php, line 310:
!NoTrans: Invalid argument supplied for foreach()!!

Warning at /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php, line 16:
!NoTrans: Cannot modify header information - headers already sent by (output started at /usr/share/mythtv/mythweb/includes/errors.php:150)!!

comment:11 Changed 2 years ago by paul@…

The MythBase?.php file no longer exists (or at least I don't see where it is located). Patching the other two above, I still don't have a functioning system. It looks like MythBase?.php was just removed?

comment:12 Changed 2 years ago by paul@…

Apologies, that file moved into a different directory.

comment:13 Changed 2 years ago by googalus.maximus@…

Yes, I am seeing similar to tino... otherwise this did the trick!

comment:14 Changed 2 years ago by Philipp Hahn <pmhahn@…>

MythBase?.php is now part of MythTV; you need to patch mythtv/bindings/php/MythBase.php in the source tree or /usr/local/share/mythtv/bindings/php/MythBase.php after installation to /usr/local/

comment:15 follow-ups: Changed 2 years ago by bnitkin@…

In MythTV .25-3, just removing the ampersand from line 50 of /usr/share/mythtv/bindings/php/MythBase.php fixed the white screen of death.
I also disabled the JSON extention in php.ini - not sure if that's an Arch Linux thing or a general issue.

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

becomes

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

comment:16 Changed 2 years ago by Dave Sp <davespmyth@…>

Regarding the comments by tino and googalus, on 0.24-fixes I am not seeing that particular issue; I get no error message when clicking for details on a search result. If I ever get around to upgrading to 0.25, I'll check again.

comment:17 in reply to: ↑ 15 Changed 2 years ago by pinballowen@…

Replying to bnitkin@…:

In MythTV .25-3, just removing the ampersand from line 50 of /usr/share/mythtv/bindings/php/MythBase.php fixed the white screen of death.
I also disabled the JSON extention in php.ini - not sure if that's an Arch Linux thing or a general issue.

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

becomes

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


This also worked for me! Using MythTV 0.25-3 and MythWeb 0.25-3

THANKYOU!

comment:18 Changed 2 years ago by pinballowen@…

The JSON extension is now built into PHP, so delete it from the /etc/php/php.ini file

comment:19 Changed 23 months ago by cooljavaj@…

The patch in schedules.php.patch is only effective in the default template of mythtv.
If you omit/reverse this patch and apply essentially the same patch to the file /usr/share/mythweb/modules/tv/schedules.php, it will work on all mythtv-templates instead of only the default one.

Changed 23 months ago by cooljavajoe@…

The patch provided by Dave Sp on an alternative location to allow it to be effective in all templates.

comment:20 in reply to: ↑ 15 Changed 23 months ago by daniel@…

This little change works well on my Fedora 17 Box. Thank you very much!

comment:21 Changed 23 months ago by Chris Petersen <cpetersen@…>

In cd670ec7bf5f04f1ba67b5a7cbc00374479eb9b0/mythtv:

Partial support for PHP 5.4

Bindings portions of the patch re #10504

comment:22 Changed 23 months ago by Chris Petersen <cpetersen@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 7232c54eec2fa1416ef8c0b3fbdad642aaf26b55/mythweb:

Suppress more PHP 5.4 warnings

Closes #10504

comment:23 Changed 22 months ago by wagnerrp

  • Milestone set to 0.26

comment:24 Changed 22 months ago by Anthony Messina <amessina@…>

  • Resolution fixed deleted
  • Status changed from closed to new

Even with the above fixes implemented on a fixes/0.25 build, the following error still pollutes the httpd logs, though MythWeb seems to work properly.

PHP Warning:  Unknown: function '0' not found or invalid function name in Unknown on line 0

What am I missing here?

comment:25 Changed 21 months ago by udovdh@…

Same here as Anthony sees.

comment:26 Changed 21 months ago by knight

  • Ticket locked set

Please no "me too"...

comment:27 Changed 19 months ago by kenni

  • Milestone changed from 0.26 to 0.26.1

comment:28 Changed 17 months ago by kenni

  • Milestone changed from 0.26.1 to 0.26
  • Resolution set to Fixed
  • Status changed from new to closed

I'm killing this one. The core issue of this ticket was that Mythweb didn't work with PHP 5.4.0 and later. This was fixed in MythTV 0.26, after which the ticket was closed. The ticket was then reopened by a user who backported the patches to 0.25 and confirmed that Mythweb now worked, but that a related error message was still being logged.

Please update to 0.26-fixes and if some other related issues still exist in that version, please create a new ticket with a precise description of the new issue.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.