Opened 14 years ago

Closed 13 years 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: Rob Smith
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@…> 14 years ago.
sorting.php.patch (810 bytes ) - added by Dave Sp <davespmyth@…> 14 years ago.
schedules.php.patch (567 bytes ) - added by Dave Sp <davespmyth@…> 14 years ago.
tv-schedules.php.patch (610 bytes ) - added by cooljavajoe@… 13 years 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 by sphery, 14 years ago

Milestone: 0.25
Priority: majorminor

resetting to defaults

comment:2 by ajg02@…, 14 years ago

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

comment:3 by Dave Sp <davespmyth@…>, 14 years ago

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.

by Dave Sp <davespmyth@…>, 14 years ago

Attachment: MythBase.php.patch added

by Dave Sp <davespmyth@…>, 14 years ago

Attachment: sorting.php.patch added

by Dave Sp <davespmyth@…>, 14 years ago

Attachment: schedules.php.patch added

comment:4 by Dave Sp <davespmyth@…>, 14 years ago

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

comment:5 by hodosiszabolcs@…, 14 years ago

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 by ajg02@…, 14 years ago

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

comment:7 by nelsonbt2001@…, 14 years ago

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 by hodosiszabolcs@…, 14 years ago

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

comment:9 by billyx@…, 14 years ago

Works for me with 0.25. Thank you, Dave!

comment:10 by tino@…, 14 years ago

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 by paul@…, 13 years ago

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 by paul@…, 13 years ago

Apologies, that file moved into a different directory.

comment:13 by googalus.maximus@…, 13 years ago

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

comment:14 by Philipp Hahn <pmhahn@…>, 13 years ago

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 by bnitkin@…, 13 years ago

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 by Dave Sp <davespmyth@…>, 13 years ago

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.

in reply to:  15 comment:17 by pinballowen@…, 13 years ago

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 by pinballowen@…, 13 years ago

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

comment:19 by cooljavaj@…, 13 years ago

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.

by cooljavajoe@…, 13 years ago

Attachment: tv-schedules.php.patch added

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

in reply to:  15 comment:20 by daniel@…, 13 years ago

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

comment:21 by Chris Petersen <cpetersen@…>, 13 years ago

In cd670ec7bf5f04f1ba67b5a7cbc00374479eb9b0/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:22 by Chris Petersen <cpetersen@…>, 13 years ago

Resolution: fixed
Status: newclosed

In 7232c54eec2fa1416ef8c0b3fbdad642aaf26b55/mythweb:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:23 by Raymond Wagner, 13 years ago

Milestone: 0.26

comment:24 by Anthony Messina <amessina@…>, 13 years ago

Resolution: fixed
Status: closednew

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 by udovdh@…, 13 years ago

Same here as Anthony sees.

comment:26 by Nicolas Riendeau, 13 years ago

Ticket locked: set

Please no "me too"...

comment:27 by Kenni Lund [kenni a kelu dot dk], 13 years ago

Milestone: 0.260.26.1

comment:28 by Kenni Lund [kenni a kelu dot dk], 13 years ago

Milestone: 0.26.10.26
Resolution: Fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.