View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 10 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Mon Nov 02, 2009 2:23 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
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

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Last edited by graysky on Mon Nov 09, 2009 4:58 am, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 03, 2009 11:25 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
it works for me.
Holy crap I've watched alot of crap.

_________________
My System


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 07, 2009 8:58 am 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
@mattbatt or anyone - can you post your /data/srv/httpd/htdocs/mythweb/modules/stats/tmpl/lite/stats.php for me to check against mine?

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 07, 2009 2:35 pm 
Offline
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location: Adelaide, Australia
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


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 07, 2009 3:01 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
Identical to mine, thanks for posting... I have no idea why I'm getting these errors!

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 07, 2009 3:22 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 07, 2009 4:28 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
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...???

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 09, 2009 5:03 am 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
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!

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 09, 2009 12:53 pm 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
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?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 09, 2009 1:16 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
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.

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu