Modify

Ticket #8158 (closed defect: fixed)

You must read the TicketHowTo before creating a new ticket or commenting on an existing ticket.

Opened 2 years ago

Last modified 21 months ago

MythWeb error pages fails to work with an empty DB or missing DB

Reported by: mdean Owned by: kormoc
Priority: minor Milestone: 0.24
Component: Plugin - MythWeb Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

When attempting to access MythWeb when there's an empty database (i.e. as after a DROP DATABASE followed by running database/mc.sql), the user gets a blank page in the browser and the Apache error logs show:

[Tue Mar 09 15:20:07 2010] [error] [client 192.168.3.2] PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required 'modules/_shared/tmpl/tmpl/header.php' (include_path='.:/usr/lib/php') in /srv/www/htdocs/myth/modules/_shared/tmpl/_errors/fatal.php on line 23

The tmpl define is undefined at this point, resulting in an attempt to acces a file in "tmpl/tmpl". Once defined (i.e as with "define('tmpl', 'default');" at the top of modules/_shared/tmpl/_errors/fatal.php), the error log shows the following error repeating 7 times:

[Tue Mar 09 15:24:46 2010] [error] [client 192.168.3.2] PHP Fatal error:  SQL Error: Table 'mythconverg.settings' doesn't exist [#1146] in /srv/www/htdocs/myth/classes/Database/Query/mysql.php on line 83

If, on the other hand, the database does not exist at all (as after a DROP DATABASE) or the user specifies invalid database connection information in the Apache configuration for MythWeb (DB host, DB name, username, or password), the browser shows the message:

Warning at /srv/www/htdocs/myth/modules/_shared/tmpl/_errors/site_down.php, line 23:
require(modules/_shared/tmpl/tmpl/header.php) [function.require]: failed to open stream: No such file or directory

Once tmpl is defined in modules/_shared/tmpl/_errors/site_down.php (as above), the browser shows the MythTV logo twice and the Apache error logs show the following errors repeated about 12 times:

[Tue Mar 09 15:33:41 2010] [error] [client 192.168.3.2] PHP Warning:  Cannot modify header information - headers already sent by (output started at /srv/www/htdocs/myth/modules/_shared/tmpl/default/header.php:49) in /srv/www/htdocs/myth/modules/_shared/tmpl/default/header.php on line 16
[Tue Mar 09 15:33:41 2010] [error] [client 192.168.3.2] PHP Fatal error:  Call to undefined function t() in /srv/www/htdocs/myth/modules/database/init.php on line 14

Attachments

Change History

comment:1 Changed 21 months ago by mdean

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from unknown to 0.24

Fixed in [24922] (and [24912]).

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.