php7 and mythweb [blank white website]

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
produnis
Newcomer
Posts: 3
Joined: Sat Jan 09, 2016 6:52 pm
Germany

php7 and mythweb [blank white website]

Post by produnis »

Hi folks,
my archlinux did an update to php7.
Since this update, mythweb won't come up, giving me an empty white page.

Code: Select all

[Sat Jan 09 20:44:02.316782 2016] [:error] [pid 4002] [client 192.168.0.2:46827] PHP Fatal error:  Uncaught Error: Call to a member function query_col() on null in /var/lib/mythtv/mythweb/includes/utils.php:59\nStack trace:\n#0 /var/lib/mythtv/mythweb/modules/_shared/tmpl/default/header.php(108): setting('recommend_enabl...', NULL)\n#1 /var/lib/mythtv/mythweb/modules/_shared/tmpl/tmpl/header.php(16): require('/var/lib/mythtv...')\n#2 /var/lib/mythtv/mythweb/modules/_shared/tmpl/_errors/error.php(19): include('/var/lib/mythtv...')\n#3 /var/lib/mythtv/mythweb/includes/errordisplay.php(198): require_once('/var/lib/mythtv...')\n#4 /var/lib/mythtv/mythweb/includes/database.php(15): custom_error('Please install ...')\n#5 /var/lib/mythtv/mythweb/includes/init.php(43): require_once('/var/lib/mythtv...')\n#6 /var/lib/mythtv/mythweb/mythweb.php(20): require_once('/var/lib/mythtv...')\n#7 {main}\n  thrown in /var/lib/mythtv/mythweb/includes/utils.php on line 59, referer: https://192.168.0.4/mythweb/status
the interesting part seems to be:

Code: Select all

require_once('/var/lib/mythtv...')\n#4 /var/lib/mythtv/mythweb/includes/database.php(15): custom_error('Please install ...')
In php7, "php-mysql" package and "mysql.so" extension have been deleted, so there might be an issue connecting to mysql?

Any idea on how to hack that?
User avatar
dekarl
Developer
Posts: 228
Joined: Thu Feb 06, 2014 11:01 pm
Germany

Re: php7 and mythweb [blank white website]

Post by dekarl »

See my comment on #12588. ext/mysql was removed in favor of ext/mysqli and ext/pdo_mysql.
arniem
Newcomer
Posts: 2
Joined: Sat Jan 30, 2016 4:06 pm
Canada

Re: php7 and mythweb [blank white website]

Post by arniem »

I ran into the same issue.
A couple of things seem to have been deprecated in php 7 - assigning the return value of new by reference and the mysql plugin.

Here's a couple of patches that I used to get things running under php 7.
The assignment patch removes the deprecated assignment.
The mysqli patch updates the code to use the mysqli plugin.
If anyone is on arch, PKGBUILD.txt is an updated build file.
Attachments
PKGBUILD.txt
arch linux PKGBUILD file
(4.65 KiB) Downloaded 228 times
mysqli.patch
Use the mysqli plugin instead of the deprecated mysql plugin.
(39.65 KiB) Downloaded 281 times
assignment.patch
Remove deprecated assigning the return value of new by reference.
(2.06 KiB) Downloaded 217 times
produnis
Newcomer
Posts: 3
Joined: Sat Jan 09, 2016 6:52 pm
Germany

Re: php7 and mythweb [blank white website]

Post by produnis »

Thx arniem!
I am on Arch,
what must I do to perform the patch?
arniem
Newcomer
Posts: 2
Joined: Sat Jan 30, 2016 4:06 pm
Canada

Re: php7 and mythweb [blank white website]

Post by arniem »

I did something like the following to build a new package.

Download PKGBUILD.txt and rename it to PKGBUILD.
Download assignment.patch and mysqli.patch.

Download the files cdparanoia.patch, mythplugins-mythweb.install and mythplugins-mythzoneminder.install from the arch package.
i.e. from https://projects.archlinux.org/svntogit ... ythplugins

Running makepkg should build the mythplugins package and create a new mythplugins-mythweb file.
Run something like the following to update the mythweb package.
pacman -U mythplugins-mythweb-1:0.27.5-2-x86_64.pkg.tar.xz

And check that you have the mysqli extension enabled in php.
produnis
Newcomer
Posts: 3
Joined: Sat Jan 09, 2016 6:52 pm
Germany

Re: php7 and mythweb [blank white website]

Post by produnis »

YEAH, THX arniem!!!!

That worked!!!

However, when I do the pacman -U mythweb.xz, I throws these error:

Code: Select all

(1/1) Installiere mythplugins-mythweb                                                                           [###################################################################] 100%
/tmp/alpm_tpotAV/.INSTALL: Linee 1: !DOCTYPE: File or directory not found
/tmp/alpm_tpotAV/.INSTALL: Line 2: Syntaxerror beim unerwarteten Wort `newline'
/tmp/alpm_tpotAV/.INSTALL: Line 2: `  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
/usr/bin/bash: post_upgrade: command not found.
Anyway, mythweb is working now!!
thx a lot!!
Post Reply