LinHES Forums
http://forums.linhes.org/

ack - problem w/ mythweb under R6 [SOLVED]
http://forums.linhes.org/viewtopic.php?f=21&t=20466
Page 1 of 1

Author:  graysky [ Mon Nov 02, 2009 2:23 pm ]
Post subject:  ack - problem w/ mythweb under R6 [SOLVED]

After my R5.5 to R6 transition, I noticed some breakage in mythweb. For example, if I browse to:

http://IP_OF_MYTHTV/mythweb/stats

Here is the result:
Code:
Error at /data/srv/httpd/htdocs/mythweb/modules/stats/tmpl/lite/stats.php, line 90:
Invalid argument supplied for foreach()
Top recorded shows #    Title    Count    Last Recorded

Error at /data/srv/httpd/htdocs/mythweb/modules/stats/tmpl/lite/stats.php, line 115:
Invalid argument supplied for foreach()
Top recorded channels #    Name    Count    Last Recorded

Author:  mattbatt [ Tue Nov 03, 2009 11:25 pm ]
Post subject: 

it works for me.
Holy crap I've watched alot of crap.

Author:  graysky [ Sat Nov 07, 2009 8:58 am ]
Post subject: 

@mattbatt or anyone - can you post your /data/srv/httpd/htdocs/mythweb/modules/stats/tmpl/lite/stats.php for me to check against mine?

Author:  Greg Frost [ Sat Nov 07, 2009 2:35 pm ]
Post subject: 

Link should be good for a month:
http://pastebin.com/m50f4c8b4
At the moment there is no significant difference between that and the one at:
http://svn.mythtv.org/svn/branches/rele ... /stats.php

Author:  graysky [ Sat Nov 07, 2009 3:01 pm ]
Post subject: 

Identical to mine, thanks for posting... I have no idea why I'm getting these errors!

Author:  tjc [ Sat Nov 07, 2009 3:22 pm ]
Post subject: 

From a quick look at the PHP code it's probably a DB issue. The foreach there is iterating over DB query results. Have you got any funky series/channel names with.

The queries proper are in mythweb/modules/stats/*.php and if you have even minimal mysql-fu you can look at the tables it's checking and look for nasty things like corrupted tables or data with special characters embedded.

Author:  graysky [ Sat Nov 07, 2009 4:28 pm ]
Post subject: 

thanks for the reply, tjc. I ran /usr/share/mythtv/contrib/optimize_mythdb.pl which checks for errors. I also believe that mythbackup also checks for errors. I have no idea what mysql-fu is, but I don't have any :)

I also read this http://knoppmyth.net/phpBB2/viewtopic.p ... sql+repair

and adapted it to R6. No errors were found...???

Author:  graysky [ Mon Nov 09, 2009 5:03 am ]
Post subject: 

Fixed it. The fix is pretty time consuming though, in short:

1) Run mythbackup and manually copy over both .gz files in /myth/backup to a safe location.
2) Backup your entire /myth/tv and to another hdd (rsync works nicely). If you have any /myth/video or /myth/music or /myth/gallery etc. make sure you back them up as well.
3) Do a fresh install of R6 erasing everything on the old hdd. Once you reboot into the new R6 system, copy over the .gz files you made in step 1 to the new /myth/backup and reboot into the R6 installer.
4) This time, do an upgrade (so you're really doing a total of two R6 installs).
5) Copy over your /myth/tv and /myth/whatever

Doing this fixed my problems. I hope someone else will find this useful.

EDIT: It looks like running /usr/LH/bin/optimize_mythdb.py causes this error! After I went through all the steps above -- AND EVERYTHING WAS WORKING -- I ran that script and noticed that it (the db?) reverted back to its broken state. Luckily, I backedup my system (mythbackup) and was able to restore the backup which fixed the problem.

Bewared: do not run /usr/LH/bin/optimize_mythdb.py!

Author:  jzigmyth [ Mon Nov 09, 2009 12:53 pm ]
Post subject: 

Graysky: I can not reproduce this on my R6.01 system. I have run the script with the backend stopped and with it running, mythweb/stats still works fine. Are there any other symptoms of corruption?

Maybe there is something about your particular database that is causing the optimize script to muck it up?

Author:  graysky [ Mon Nov 09, 2009 1:16 pm ]
Post subject: 

I have no idea... I'm not knowledgeable at all about mysql and its workings. I just know that if I run the script, my mythweb gives those errors. I can reverse the 'damage' by restoring my backup.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/