Opened 13 years ago
Closed 12 years ago
#10504 closed Bug Report - General (Fixed)
mythweb incomatible with PHP 5.4.0 and later ( Call-time pass-by-reference)
Reported by: | 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)
Change History (32)
comment:1 Changed 13 years ago by
Milestone: | 0.25 |
---|---|
Priority: | major → minor |
comment:2 Changed 13 years ago by
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 13 years ago by
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 13 years ago by
Attachment: | MythBase.php.patch added |
---|
Changed 13 years ago by
Attachment: | sorting.php.patch added |
---|
Changed 13 years ago by
Attachment: | schedules.php.patch added |
---|
comment:5 Changed 13 years ago by
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 13 years ago by
The patches do contain changes and they do work for me. Thanks Dave Sp.
comment:7 Changed 13 years ago by
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:10 Changed 13 years ago by
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 years ago by
comment:13 Changed 13 years ago by
Yes, I am seeing similar to tino... otherwise this did the trick!
comment:14 Changed 13 years ago by
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 13 years ago by
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 13 years ago by
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 Changed 13 years ago by
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 13 years ago by
The JSON extension is now built into PHP, so delete it from the /etc/php/php.ini file
comment:19 Changed 13 years ago by
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 13 years ago by
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 Changed 13 years ago by
This little change works well on my Fedora 17 Box. Thank you very much!
comment:22 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:23 Changed 13 years ago by
Milestone: | → 0.26 |
---|
comment:24 Changed 12 years ago by
Resolution: | fixed |
---|---|
Status: | closed → 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:27 Changed 12 years ago by
Milestone: | 0.26 → 0.26.1 |
---|
comment:28 Changed 12 years ago by
Milestone: | 0.26.1 → 0.26 |
---|---|
Resolution: | → Fixed |
Status: | new → 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.
resetting to defaults