Ticket #10504 (closed Bug Report - General: Fixed)
Opened 14 months ago
Last modified 6 months ago
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
Change History
comment:1 Changed 14 months ago by mdean
- Priority changed from major to minor
- Milestone 0.25 deleted
comment:2 Changed 14 months 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 14 months 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.
comment:4 Changed 14 months ago by Dave Sp <davespmyth@…>
Oh, and this is against the 0.24-fixes code, not 0.25.
comment:5 Changed 14 months 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 14 months ago by ajg02@…
The patches do contain changes and they do work for me. Thanks Dave Sp.
comment:7 Changed 14 months 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 14 months ago by hodosiszabolcs@…
Sorry about wasting your time, it was my fault. Yes it's working.
comment:9 Changed 14 months ago by billyx@…
Works for me with 0.25. Thank you, Dave!
comment:10 Changed 14 months 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 13 months ago by paul@…
comment:12 Changed 13 months ago by paul@…
Apologies, that file moved into a different directory.
comment:13 Changed 13 months ago by googalus.maximus@…
Yes, I am seeing similar to tino... otherwise this did the trick!
comment:14 Changed 12 months 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: ↓ 17 ↓ 20 Changed 12 months 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 12 months 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 12 months 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 12 months ago by pinballowen@…
The JSON extension is now built into PHP, so delete it from the /etc/php/php.ini file
comment:19 Changed 12 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 12 months ago by cooljavajoe@…
- 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.
comment:20 in reply to: ↑ 15 Changed 12 months ago by daniel@…
This little change works well on my Fedora 17 Box. Thank you very much!
comment:21 Changed 11 months ago by Chris Petersen <cpetersen@…>
comment:22 Changed 11 months ago by Chris Petersen <cpetersen@…>
- Status changed from new to closed
- Resolution set to fixed
comment:24 Changed 11 months ago by Anthony Messina <amessina@…>
- Status changed from closed to new
- Resolution fixed deleted
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 10 months ago by udovdh@…
Same here as Anthony sees.
comment:28 Changed 6 months ago by kenni
- Status changed from new to closed
- Resolution set to Fixed
- Milestone changed from 0.26.1 to 0.26
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.

resetting to defaults