[mythtv-commits] Ticket #8158: MythWeb error pages fails to work with an empty DB or missing DB

MythTV mythtv at cvs.mythtv.org
Tue Mar 9 20:44:01 UTC 2010


#8158: MythWeb error pages fails to work with an empty DB or missing DB
------------------------------+---------------------------------------------
 Reporter:  mdean             |       Owner:  kormoc 
     Type:  defect            |      Status:  new    
 Priority:  minor             |   Milestone:  unknown
Component:  Plugin - MythWeb  |     Version:  head   
 Severity:  low               |     Mlocked:  0      
------------------------------+---------------------------------------------
 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
 }}}

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/8158>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list