Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

mythweb header information error

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


mark at boyum

Nov 18, 2009, 7:05 PM

Post #1 of 17 (1692 views)
Permalink
mythweb header information error

Since upgrading to .22 (via moving my DB to a 'clean' Ubuntu 9.10) mythweb
only displays this text:

Warning: Cannot modify header information - headers already sent by (output
started at
/usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php:49) in
/usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php on line 16

I see Trac ticket #7513 for this issue but wonder if anyone else has found a
way to correct or work around the error.

Any pointers would be appreciated.
Thanks,
-Mark


digitalaudiorock at gmail

Nov 19, 2009, 6:52 AM

Post #2 of 17 (1654 views)
Permalink
Re: mythweb header information error [In reply to]

On Wed, Nov 18, 2009 at 10:05 PM, Mark Boyum <mark [at] boyum> wrote:
> Since upgrading to .22 (via moving my DB to a 'clean' Ubuntu 9.10) mythweb
> only displays this text:
>
> Warning: Cannot modify header information - headers already sent by (output
> started at
> /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php:49) in
> /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php on line 16
>
> I see Trac ticket #7513 for this issue but wonder if anyone else has found a
> way to correct or work around the error.
>
> Any pointers would be appreciated.
> Thanks,
> -Mark
>

I can see why nothings happening with that bug, as what's there
doesn't really tell much. That's the error you get in php if you try
to send http headers when something has already been sent to the
browser. The most common cause for that is an error occurring which
prints some error message at some point before that. However that
could be from almost anything.

When is happens, use your browsers "view source" to see if there's any
sort of error text there. That might give some more information to go
on.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


digitalaudiorock at gmail

Nov 19, 2009, 7:32 AM

Post #3 of 17 (1662 views)
Permalink
Re: mythweb header information error [In reply to]

On Wed, Nov 18, 2009 at 10:05 PM, Mark Boyum <mark [at] boyum> wrote:
> Since upgrading to .22 (via moving my DB to a 'clean' Ubuntu 9.10) mythweb
> only displays this text:
>
> Warning: Cannot modify header information - headers already sent by (output
> started at
> /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php:49) in
> /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php on line 16
>
> I see Trac ticket #7513 for this issue but wonder if anyone else has found a
> way to correct or work around the error.
>
> Any pointers would be appreciated.
> Thanks,
> -Mark
>

I just noticed something interesting about that error. I was going to
add it to the comments on that bug, but the bug is apparently locked.

The error is coming from modules/_shared/tmpl/default/header.php at
line 16 where it's attempting to print headers with the header()
function, _and_ the output that has apparently already been sent is
coming from the same file at line 49. That tells me that that page is
getting erroneously included at run time (using 'require') more than
once.

I'm not even running 0.22 yet. If I get a chance I'll take a look at
it though. What plugins are you using by the way?

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


info at gxl

Nov 19, 2009, 12:34 PM

Post #4 of 17 (1638 views)
Permalink
Re: mythweb header information error [In reply to]

Since its working here I can't test anything but changing line 16 in
usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php

from:
header("Content-Type: text/html; charset=utf-8");
to:
if (!headers_sent()) header("Content-Type: text/html; charset=utf-8");

should get you going again. However this is not a fix for this problem
since it seems indeed that the file is included twice, but maybe this
way you can confirm you see the page twice?

NIjn


Tom Dexter said the following on 19/11/09 16:32:
> On Wed, Nov 18, 2009 at 10:05 PM, Mark Boyum <mark [at] boyum> wrote:
>
>> Since upgrading to .22 (via moving my DB to a 'clean' Ubuntu 9.10) mythweb
>> only displays this text:
>>
>> Warning: Cannot modify header information - headers already sent by (output
>> started at
>> /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php:49) in
>> /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php on line 16
>>
>> I see Trac ticket #7513 for this issue but wonder if anyone else has found a
>> way to correct or work around the error.
>>
>> Any pointers would be appreciated.
>> Thanks,
>> -Mark
>>
>>
>
> I just noticed something interesting about that error. I was going to
> add it to the comments on that bug, but the bug is apparently locked.
>
> The error is coming from modules/_shared/tmpl/default/header.php at
> line 16 where it's attempting to print headers with the header()
> function, _and_ the output that has apparently already been sent is
> coming from the same file at line 49. That tells me that that page is
> getting erroneously included at run time (using 'require') more than
> once.
>
> I'm not even running 0.22 yet. If I get a chance I'll take a look at
> it though. What plugins are you using by the way?
>
> Tom
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>


mark at boyum

Nov 19, 2009, 7:55 PM

Post #5 of 17 (1637 views)
Permalink
Re: mythweb header information error [In reply to]

> I just noticed something interesting about that error. I was going to
> add it to the comments on that bug, but the bug is apparently locked.
>
> The error is coming from modules/_shared/tmpl/default/header.php at
> line 16 where it's attempting to print headers with the header()
> function, _and_ the output that has apparently already been sent is
> coming from the same file at line 49. That tells me that that page is
> getting erroneously included at run time (using 'require') more than
> once.
>
> I'm not even running 0.22 yet. If I get a chance I'll take a look at
> it though. What plugins are you using by the way?
>
> Tom
> _______________________________________________
>

The page source output is attached. I am running MythGallery, MythMusic,
MythWeather plugins.
All that is displayed on the browser screen is two Mythtv logos and that
error message.

-Mark
Attachments: page_source.htm (4.68 KB)


mark at boyum

Nov 19, 2009, 7:57 PM

Post #6 of 17 (1640 views)
Permalink
Re: mythweb header information error [In reply to]

On Thu, Nov 19, 2009 at 2:34 PM, GXL.nl <info [at] gxl> wrote:

> Since its working here I can't test anything but changing line 16 in
> usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php
>
> from:
> header("Content-Type: text/html; charset=utf-8");
> to:
> if (!headers_sent()) header("Content-Type: text/html; charset=utf-8");
>
> should get you going again. However this is not a fix for this problem
> since it seems indeed that the file is included twice, but maybe this way
> you can confirm you see the page twice?
>
> NIjn
>
>
I tried that and it removed the error. Unfortunately Mythweb continues to
only display two MythTV logos in the browser.
I am unfamiliar with php and at a loss.


info at gxl

Nov 20, 2009, 12:49 AM

Post #7 of 17 (1613 views)
Permalink
Re: mythweb header information error [In reply to]

Mark Boyum said the following on 20/11/09 04:57:
>
> On Thu, Nov 19, 2009 at 2:34 PM, GXL.nl <info [at] gxl
> <mailto:info [at] gxl>> wrote:
>
> Since its working here I can't test anything but changing line 16
> in usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php
>
> from:
> header("Content-Type: text/html; charset=utf-8");
> to:
> if (!headers_sent()) header("Content-Type: text/html;
> charset=utf-8");
>
> should get you going again. However this is not a fix for this
> problem since it seems indeed that the file is included twice, but
> maybe this way you can confirm you see the page twice?
>
> NIjn
>
>
> I tried that and it removed the error. Unfortunately Mythweb
> continues to only display two MythTV logos in the browser.
> I am unfamiliar with php and at a loss.
>
Can you set that line back again and add this line:
var_export(build_backtrace(false));

and then give us the html page for that?

Also can you get to http://mythtv/mythweb/?RESET_SKIN&RESET_TMPL and
does that resolve anything?


mark at boyum

Nov 20, 2009, 7:03 AM

Post #8 of 17 (1605 views)
Permalink
Re: mythweb header information error [In reply to]

>
> var_export(build_backtrace(false));
>
> and then give us the html page for that?
>
> Also can you get to http://mythtv/mythweb/?RESET_SKIN&RESET_TMPL and does
> that resolve anything?
>
>
>
> I attempted the reset skin link and there was no change.

Attached is the html source after added the above line.

Thanks again,
-Mark
Attachments: page_source_with_backtrace.htm.zip (3.69 KB)


info at gxl

Nov 20, 2009, 8:24 AM

Post #9 of 17 (1598 views)
Permalink
Re: mythweb header information error [In reply to]

Mark Boyum said the following on 20/11/09 16:03:
>
> var_export(build_backtrace(false));
>
> and then give us the html page for that?
>
> Also can you get to http://mythtv/mythweb/?RESET_SKIN&RESET_TMPL
> <http://mythtv/mythweb/?RESET_SKIN&RESET_TMPL> and does that
> resolve anything?
>
>
>
> I attempted the reset skin link and there was no change.
>
> Attached is the html source after added the above line.
>
> Thanks again,
> -Mark
>
I think mythweather isn't installed right. You're missing the
weatherscreens table (and probably other tables as well. Try to remove
mythweather and see if that fixes it. If it does, try to reinstall
mythweather.

And remove the line you added before: var_export(build_backtrace(false));


mark at boyum

Nov 20, 2009, 9:55 AM

Post #10 of 17 (1598 views)
Permalink
Re: mythweb header information error [In reply to]

>
> I think mythweather isn't installed right. You're missing the
> weatherscreens table (and probably other tables as well. Try to remove
> mythweather and see if that fixes it. If it does, try to reinstall
> mythweather.
>
> And remove the line you added before: var_export(build_backtrace(false));
>

No change after removing mythweather. I have also removed and re-installed
mythweb via the Mythbuntu Control Centre with no luck. Are there any steps
that can be taken to completely clean the system of any traces of mythweb
after removing the package? I'm guessing that there is something being left
behind after I remove it.


mark at boyum

Nov 20, 2009, 3:22 PM

Post #11 of 17 (1571 views)
Permalink
Re: mythweb header information error [In reply to]

On Fri, Nov 20, 2009 at 11:55 AM, Mark Boyum <mark [at] boyum> wrote:

> I think mythweather isn't installed right. You're missing the
>> weatherscreens table (and probably other tables as well. Try to remove
>> mythweather and see if that fixes it. If it does, try to reinstall
>> mythweather.
>>
>> And remove the line you added before: var_export(build_backtrace(false));
>>
>
> No change after removing mythweather. I have also removed and re-installed
> mythweb via the Mythbuntu Control Centre with no luck. Are there any steps
> that can be taken to completely clean the system of any traces of mythweb
> after removing the package? I'm guessing that there is something being left
> behind after I remove it.
>
>
> I've renamed fatal.php to prevent it from loading and now can see that
there are indeed errors pertaining to mythweather even though it has been
uninstalled. I've attached the html output.

How do I create the mythweather tables when the plugin doesn't seem to do it
on its own?

-Mark
Attachments: mythweb_remvoed_fatal.php.html (7.52 KB)


mtdean at thirdcontact

Nov 20, 2009, 5:20 PM

Post #12 of 17 (1579 views)
Permalink
Re: mythweb header information error [In reply to]

On 11/20/2009 06:22 PM, Mark Boyum wrote:
> I've renamed fatal.php to prevent it from loading and now can see that
> there are indeed errors pertaining to mythweather even though it has
> been uninstalled. I've attached the html output.
>
> How do I create the mythweather tables when the plugin doesn't seem to
> do it on its own?

Sounds like your distro disabled the InnoDB storage engine on your MySQL
server to conserve some of that "precious RAM."

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


info at gxl

Nov 21, 2009, 12:21 PM

Post #13 of 17 (1515 views)
Permalink
Re: mythweb header information error [In reply to]

Mark Boyum said the following on 21/11/09 00:22:
> On Fri, Nov 20, 2009 at 11:55 AM, Mark Boyum <mark [at] boyum
> <mailto:mark [at] boyum>> wrote:
>
> I think mythweather isn't installed right. You're missing the
> weatherscreens table (and probably other tables as well. Try
> to remove mythweather and see if that fixes it. If it does,
> try to reinstall mythweather.
>
> And remove the line you added before:
> var_export(build_backtrace(false));
>
>
> No change after removing mythweather. I have also removed and
> re-installed mythweb via the Mythbuntu Control Centre with no
> luck. Are there any steps that can be taken to completely clean
> the system of any traces of mythweb after removing the package?
> I'm guessing that there is something being left behind after I
> remove it.
>
>
> I've renamed fatal.php to prevent it from loading and now can see that
> there are indeed errors pertaining to mythweather even though it has
> been uninstalled. I've attached the html output.
>
> How do I create the mythweather tables when the plugin doesn't seem to
> do it on its own?
>
> -Mark
>
Can you give the output of mysql -u mythtv -p mythconverg -e 'SHOW
TABLES;' to see if the tables are created or that there is another problem?


Or you can try do to this (I quote Mike for his solution to me on
another matter :)) that should give you a db with all the tables.

Could you try doing a full SQL-based backup (
http://www.mythtv.org/wiki/Database_Backup_and_Restore ), then dropping
your database and creating a new database (
http://www.mythtv.org/wiki/Database_Backup_and_Restore#Database_Restore
), then doing a full restore of the backup (
http://www.mythtv.org/wiki/Database_Backup_and_Restore#Full_restore_of_a_specific_backup_file
)?


mark at boyum

Nov 22, 2009, 5:57 PM

Post #14 of 17 (1481 views)
Permalink
Re: mythweb header information error [In reply to]

Can you give the output of mysql -u mythtv -p mythconverg -e 'SHOW TABLES;'
to see if the tables are created or that there is another problem?

Or you can try do to this (I quote Mike for his solution to me on another
matter :)) that should give you a db with all the tables.

Could you try doing a full SQL-based backup (
http://www.mythtv.org/wiki/Database_Backup_and_Restore ), then dropping your
database and creating a new database (
http://www.mythtv.org/wiki/Database_Backup_and_Restore#Database_Restore ),
then doing a full restore of the backup (
http://www.mythtv.org/wiki/Database_Backup_and_Restore#Full_restore_of_a_specific_backup_file)?


Here is the SHOW TABLES output:
Tables_in_mythconverg
archiveitems
callsignnetworkmap
capturecard
cardinput
channel
channelgroup
channelgroupnames
channelscan
channelscan_channel
channelscan_dtv_multiplex
codecparams
credits
customexample
diseqc_config
diseqc_tree
displayprofilegroups
displayprofiles
dtv_multiplex
dtv_privatetypes
dvdbookmark
dvdinput
dvdtranscode
eit_cache
filemarkup
gallerymetadata
housekeeping
inputgroup
inuseprograms
jobqueue
jumppoints
keybindings
keyword
music_albumart
music_albums
music_artists
music_directories
music_genres
music_playlists
music_smartplaylist_categories
music_smartplaylist_items
music_smartplaylists
music_songs
music_stats
mythconverg.weatherscreens
mythlog
mythnettv_archive
mythnettv_category
mythnettv_group
mythnettv_log
mythnettv_programs
mythnettv_proxies
mythnettv_proxy_usage
mythnettv_settings
mythnettv_subscriptions
mythweb_sessions
netflix
networkiconmap
oldfind
oldflix
oldprogram
oldrecorded
people
pidcache
playgroup
powerpriority
profilegroups
program
programgenres
programrating
recgrouppassword
record
record_tmp
recorded
recordedcredits
recordedfile
recordedmarkup
recordedprogram
recordedrating
recordedseek
recordingprofiles
recordmatch
schemalock
settings
storagegroup
tvchain
tvosdmenu
upnpmedia
videocast
videocategory
videocountry
videogenre
videometadata
videometadatacast
videometadatacountry
videometadatagenre
videosource
videotypes
weatherdatalayout
weatherscreens
weathersourcesettings


Oddly enough when I run mysql -u root -p -e 'SELECT COUNT(screen_id) FROM
mythconverg.weatherscreens;' I get:
ERROR 1146 (42S02) at line 1: Table 'mythconverg.weatherscreens' doesn't
exist

Also, when I look at the db in phpmyadmin it doesn't show the weather
tables.

Michael Dean suggested that perhaps InnoDB is disabled on my installation.
How would I go about verifying that and correcting it if it needs to be
active?

I will try the backup / create / restore route if I can't get it resolved by
the next time I'm home and the system isn't recording for a day. Which is
usually only Saturday.


mtdean at thirdcontact

Nov 22, 2009, 7:42 PM

Post #15 of 17 (1473 views)
Permalink
Re: mythweb header information error [In reply to]

On 11/22/2009 08:57 PM, Mark Boyum wrote:
> Here is the SHOW TABLES output:
> Tables_in_mythconverg
...
> weatherdatalayout
> weatherscreens
> weathersourcesettings
>
>
> Oddly enough when I run mysql -u root -p -e 'SELECT COUNT(screen_id)
> FROM mythconverg.weatherscreens;' I get:
> ERROR 1146 (42S02) at line 1: Table 'mythconverg.weatherscreens'
> doesn't exist
>
> Also, when I look at the db in phpmyadmin it doesn't show the weather
> tables.
>
> Michael Dean suggested that perhaps InnoDB is disabled on my
> installation. How would I go about verifying that and correcting it
> if it needs to be active?

That's almost definitely the problem, then. The defined but
non-existent table is the closes thing to proof we can get (short of
actually verifying--instructions for verifying below).

> I will try the backup / create / restore route if I can't get it
> resolved by the next time I'm home and the system isn't recording for
> a day. Which is usually only Saturday.

If you're missing the InnoDB engine support, this won't help since it
will again fail to create the InnoDB files since you don't have InnoDB
storage engine support, so you need to fix that first.

There's almost definitely a skip-innodb option in your /etc/my.cnf file
(or in the command-line arguments in your mysqld start script or in some
config file used by that start script). Remove the option/argument.
Then, restart mysqld and verify InnoDB is enabled:

mysql -umythtv -p mythconverg -e 'SHOW ENGINES;'

And verify there's a line with Engine 'InnoDB' with Support set to 'YES'.

Then, you can restore the last backup you had from when MythWeather
worked (but you'll lose all changes to settings /and/ all recordings and
... since that backup), or--my suggestion--since MythWeather has no real
data (and only a bit of configuration), just recreate the MythWeather
schema:

cat << "EOF" | mysql -umythtv -p mythconverg
DELETE TABLE IF EXISTS weathersourcesettings;
DELETE TABLE IF EXISTS weatherscreens;
DELETE TABLE IF EXISTS weatherdatalayout;
DELETE FROM settings WHERE value = 'WeatherDBSchemaVer';
EOF

Then restart mythfrontend.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mark at boyum

Nov 23, 2009, 9:35 AM

Post #16 of 17 (1436 views)
Permalink
Re: mythweb header information error [In reply to]

>
>
> mysql -umythtv -p mythconverg -e 'SHOW ENGINES;'
>
> And verify there's a line with Engine 'InnoDB' with Support set to 'YES'.
>
> Then, you can restore the last backup you had from when MythWeather worked
> (but you'll lose all changes to settings /and/ all recordings and ... since
> that backup), or--my suggestion--since MythWeather has no real data (and
> only a bit of configuration), just recreate the MythWeather schema:
>
> cat << "EOF" | mysql -umythtv -p mythconverg
> DELETE TABLE IF EXISTS weathersourcesettings;
> DELETE TABLE IF EXISTS weatherscreens;
> DELETE TABLE IF EXISTS weatherdatalayout;
> DELETE FROM settings WHERE value = 'WeatherDBSchemaVer';
> EOF
>
> Then restart mythfrontend.
>
> Mike
>

Thanks Mike and GXL,
That did it! Although I replaced "DELETE TABLE" with "DROP TABLE" to get it
to execute.

The was the first and only upgrade difficulty I have ever had with MythTV.
As always the Myth community was very helpful and my system is running
normally again before any impact to the WAF.

-Mark


mtdean at thirdcontact

Nov 23, 2009, 9:56 AM

Post #17 of 17 (1428 views)
Permalink
Re: mythweb header information error [In reply to]

On 11/23/2009 12:35 PM, Mark Boyum wrote:
>> mysql -umythtv -p mythconverg -e 'SHOW ENGINES;'
>>
>> And verify there's a line with Engine 'InnoDB' with Support set to 'YES'.
>>
>> Then, you can restore the last backup you had from when MythWeather worked
>> (but you'll lose all changes to settings /and/ all recordings and ... since
>> that backup), or--my suggestion--since MythWeather has no real data (and
>> only a bit of configuration), just recreate the MythWeather schema:
>>
>> cat << "EOF" | mysql -umythtv -p mythconverg
>> DELETE TABLE IF EXISTS weathersourcesettings;
>> DELETE TABLE IF EXISTS weatherscreens;
>> DELETE TABLE IF EXISTS weatherdatalayout;
>> DELETE FROM settings WHERE value = 'WeatherDBSchemaVer';
>> EOF
>>
>> Then restart mythfrontend.
> Thanks Mike and GXL,
> That did it! Although I replaced "DELETE TABLE" with "DROP TABLE" to get it
> to execute.
>

Heh, yeah. I shouldn't send e-mails when I'm tired. Long weekend.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.