Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#12588 closed Bug Report - General (fixed)

MythWeb does not support php7

Reported by: mythtv@… Owned by: Stuart Auchterlonie
Priority: minor Milestone: 0.28
Component: Plugin - MythWeb Version: 0.27.5
Severity: medium Keywords:
Cc: Ticket locked: no

Description

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

    [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: Alles auswählen

    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 removed, so there might be an issue connecting to mysql?

Change History (12)

comment:1 Changed 4 years ago by Frank Phillips <fphillips81@…>

I would say it is rather because of this:

"This means that custom error handlers may no longer be triggered because exceptions may be thrown instead (causing new fatal errors for uncaught Error exceptions)." From http://php.net/manual/en/migration70.incompatible.php

In my error_log on 0.27-fixes with php-7.0.2:

[Sat Jan 09 17:25:56.154668 2016] [:error] [pid 8977] [client 192.168.2.5:47614] 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: http://192.168.2.12/mythweb/status

comment:2 Changed 4 years ago by Karl Egly

Summary: mythweb shows blank white page with php7MythWeb does not support php7

According to http://php.net/manual/en/migration55.deprecated.php and https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7 MythWeb needs to be rewritten from ext/mysql to ext/mysqli or ext/pdo_mysql.

comment:3 Changed 4 years ago by Stuart Auchterlonie

Owner: changed from Rob Smith to Stuart Auchterlonie
Status: newaccepted

This is going to need somebody to write some patches to fix.

Requirements:

  • use ext/mysqli or ext/pdo_mysql instead (probably mysqli)
  • work with php5 and php7 (mysqli does)

comment:4 Changed 4 years ago by mythtv@…

comment:5 Changed 4 years ago by Stuart Auchterlonie <stuarta@…>

In 766357389c8489482a2c1f4ea6a98bce49070b1f/mythweb:

Refs #12588 PHP7 Support. Remove depreciated assignment.

Thanks arniem on the forums for the patch

comment:6 Changed 4 years ago by Stuart Auchterlonie <stuarta@…>

In f4240e5e48f25fa40e84faabffa5522b009ab6e0/mythweb:

Refs #12588 PHP7 Support. Switch to mysqli plugin

Thanks arniem on the forums for the patch

comment:7 Changed 4 years ago by Stuart Auchterlonie <stuarta@…>

In f3931a956b62d5144dfaf5275e65381120bb2aab/mythweb:

Refs #12588 PHP7 Support. Remove depreciated assignment.

Thanks arniem on the forums for the patch

comment:8 Changed 4 years ago by Stuart Auchterlonie <stuarta@…>

Resolution: fixed
Status: acceptedclosed

In da1e99c58ffe276a99e322456c5d846c090f327c/mythweb:

Fixes #12588 PHP7 Support. Switch to mysqli plugin

Thanks arniem on the forums for the patch

comment:9 Changed 4 years ago by Stuart Auchterlonie

Milestone: unknown0.28

comment:10 Changed 4 years ago by warpme@…

I'm on ArchLinux? with PHP 5.4.3. After https://github.com/MythTV/mythweb/commit/f4240e5e48f25fa40e84faabffa5522b009ab6e0 I'm started to getting in mythweb music module white page. My http server (lighttpd) returns following error in log:

[07-Feb-2016 16:29:25 UTC] PHP Parse error:  syntax error, unexpected ';' in /var/http/mythweb/modules/music/mp3act_functions.php on line 53

Reverting https://github.com/MythTV/mythweb/commit/f4240e5e48f25fa40e84faabffa5522b009ab6e0 fixes issue. I checked my PHP config and mysqli plugin is enabled and mysqli.so is present. If there is possibility that root cause is within my httpd/php config - pls advice how to check/verify/correct this.

comment:11 Changed 4 years ago by Karl Dietz <dekarl@…>

In 93adb4d962a27352fd1cf772d46af59d1b201090/mythweb:

fix syntax error after f4240e5e48f25fa40e84faabffa5522b009ab6e0

pointed out by Piotr Oniszczuk

Refs #12588

comment:12 Changed 4 years ago by Karl Dietz <dekarl@…>

In 7cefc58290d5ef2fc02ebf7e0d51b9532f2f8828/mythweb:

fix syntax error after f4240e5e48f25fa40e84faabffa5522b009ab6e0

pointed out by Piotr Oniszczuk

Refs #12588

(cherry picked from commit 93adb4d962a27352fd1cf772d46af59d1b201090)

Note: See TracTickets for help on using tickets.