NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

#1 02-05-2011 14:50:16

arisidhe
Member

mySQL/php corruption and data loss

So, I've been hosting my oekaki board http://arisidhe.site88.net/oekaki/index.php on 000webhost.com for over a year now, and nothing like this has ever happened before.  It seems that somewhat over a recent day's worth (February 3rd) of pictures and comments were deleted from the files of my account, and a few more pictures corrupted/data lost as well (pictures 631-633 if you scroll down a little on the first page, show up as broken).  People kept on drawing though and the oekaki seems to have moved on without it (original pictures 634-637 were lost and now overwritten with new images), and for now things seem to be working alright.  I am not too particularly concerned over the loss or in recovering the pictures, since it was only a day's worth (though the board does move fast, there were only 7 and some had been saved beforehand), but what I am concerned for is the php/tables where the data is being stored.  I am able to track the exact loss of material because when I click on phpMyAdmin and browse the tables, I can still see the stored data for the comments and images that were erased (though I can't access the pictures); moreso, the recent comments and pictures do not appear in my php, which makes me wonder as to where they might be going to.  I don't understand php/mySQL very well, but I feel like they're important somehow to the board...

Anyway, I contacted the website help desk about my issue and described it, but all they offered me was this:

"your site is on a very old server and has had lot of issue so it is best if you move your site to a different server or upgrade to paid host.

the moving of the server might make your file unavailable at time and if you are changing something while it is move it might be half done.  Please check your file to see if they are all what they should be.

Please note we don't help to troubleshoot or debug php issue."

So, I would just like to know:  If I move to a new server, will my problems with php be fixed?  Is moving to a new server safe, or should I just stick to this one and see if this ever occurs again?  (Sorry, I'm just kinda paranoid about accidentally crashing the site or losing data.)  And Wac, if you need to, I'll gladly send you my login info for 000webhost so you can take a look if you need to. 
Thank you again for all your help!

Last edited by arisidhe (02-05-2011 14:51:01)

Offline

#2 02-05-2011 22:14:57

Waccoon
Administrator

Re: mySQL/php corruption and data loss

I'd be interested in knowing if the oekaki log shows any unusual activity.  Most of the time when pictures can't be saved, it will show up in the log.  You can access the log by logging in as the owner, and going to the Administration -> Log menu.

The thing that bothers me is that from what I can see, the pictures were on the site at one point, and people commented on them, but at some point the pictures just vanished.  Also, it appears that 3 consecutive pictures were deleted, along with their animations and (if there were any) the thumbnails as well.  If a whole group of files disappear at the same time, that might mean that all the files saved within a specific time period were affected.  That kind of points to a maintenance/backup glitch.

Also, not to pass the buck, but I'm a bit confused by what the web host means by, "your site is on a very old server and has had lot of issue so it is best if you move your site to a different server or upgrade to paid host."  I'm wondering if they are saying their their server is at fault, and they're trying to get you to pay money for a working server?  I do know that some people who have hosted with 000webhost.com have experienced slow FTP access and occasional database overloads.  These are annoying, but they shouldn't cause data corruption.  Web servers are generally designed to prevent data corruption at any cost, even if the machines are really slow or refuse connections.

As for problems with the oekaki, has anyone reported difficulties in retouching pictures (which attempts to replace the old files with new files)?

I am able to track the exact loss of material because when I click on phpMyAdmin and browse the tables, I can still see the stored data for the comments and images that were erased (though I can't access the pictures); moreso, the recent comments and pictures do not appear in my php, which makes me wonder as to where they might be going to.

The recent pictures and comments do not appear in phpMyAdmin?

Okay, the "oekakidta" table contains information about all the pictures and comments.  If you sort the table by "postdate", what's the most recent "postdate" and "PIC_ID" that shows up?  It should match the newest picture posted on the oekaki.  At the time I'm posting this, that should be PIC_ID="639" and postdate="2011-02-05 20:13:00"

Offline

#3 02-06-2011 00:05:45

arisidhe
Member

Re: mySQL/php corruption and data loss

Yeah, that's what worries me about the whole thing, too, the fact that stuff from a while got totally washed.  And the web host help really wasn't very useful.  hmm
And personally, I've never had a problem before with the server.  Sure, there were times when it was down, but it's always been fast and reliable and never ate up any of my data or anything like this before. 
Anyway, here's a screen of recent logs: http://img607.imageshack.us/img607/4343/scr1320970.jpg 
I don't think there are any serious errors here, though I am curious as to what the earlier sql errors with "out of memory" might mean... does it relate to uploads perhaps?  I feel like it's not related to this current problem though, ahahaha.

But yeah, when I go to check phpMyAdmin, I scroll to the most recent comments and pictures, and it shows the stuff that was deleted and nothing after.  I'm quite sure, unless my computer is doing some weird cacheing thing. 

So Wac, I also tried to manually re-upload pictures 631 and 633 to the oekaki, since they were saved previous to the crash.  This is what the file manager reported back to me: http://img690.imageshack.us/img690/7625/scr2878930.jpg  And it doesn't seem to have fixed the broken images.
So yeah, seems liks there's something up with transferring to the ftp? 

And I did a real fast test on the oekaki with shipainter; seems like retouch works fine. 

I've e-mailed you the login information so you can take a look; thank you again for all of your hard work and your help!  You're the best, Wac.  ;v;

Last edited by arisidhe (02-06-2011 00:19:05)

Offline

#4 02-06-2011 03:18:23

Waccoon
Administrator

Re: mySQL/php corruption and data loss

The out of memory errors mean the server is overloaded.  Line 274 in boot.php is the first time that the oekaki tries to get information from the database to log in a registered member.  Since they all happen on the same line and on the first database call, I wouldn't worry about it.  That just means someone will have to hit the "refresh" button on their web browser to view the board.

There's nothing else unusual about the log.  I assume the "fail" at the top for picture 633 is when you hit the "Thumb" button to try and rebuild the thumbnail, and it's complaining that the picture isn't there.

The second screen shot is interesting, and this tells me there's some kind of filesystem permission issue.  I'll have to check that out and get back to you.

Offline

#5 02-06-2011 04:18:12

Waccoon
Administrator

Re: mySQL/php corruption and data loss

Okay, I've accessed the site and have found out a few things.

First, I don't think there's anything wrong with the database.  The error log on the server has a few glitches listed for last month, but nothing major.  I wouldn't worry about comments disappearing and stuff like that.

Second, FTP access of the pictures and avatars folders didn't work.  So, I fixed them.  You should now be able to upload image directly into the pictures folder, so if you have a backup of picture 633 or whatever, you should be able to put it back.  The only catch is that if you upload an image to the pictures folder directly, you should CHMOD it to 666 (or, turn on Read and Write permissions for all groups.  You shouldn't have to enable Execute permissions, but I suppose you can do that if you want).

Third, there's one little thing that can be fixed.  Log into the oekaki, and go to the Control Panel.  At the very top look for "URL to OekakiPoteto".  Get rid of the "index.php" at the end, so it shows up as "http://arisidhe.site88.net/oekaki".  I'll fix the installer so that the "index.php" is always stripped off the end.  It's not a big deal, though.  It's certainly not causing the disappearing pictures.

As for why the images have disappeared, I haven't found out anything that can explain it.  All of your FTP permissions are fine, the oekaki log doesn't show anything, and the server log hasn't shown any database issues for the last month.  I'm tempted to write this one off as a server maintenance/backup issue.  Please keep an eye on it and if you have more problems, let me know ASAP.

Offline

#6 02-06-2011 11:19:26

arisidhe
Member

Re: mySQL/php corruption and data loss

Thank you very much, Wac!  I've re-uploaded the two files and pulled off the index.php bit for the url. 

And yeah, so far everything else has been running smoothly on the board, so hopefully things'll just be okay from here on out. 
But I'm still kind of lost as to the php/mySQL bit... the mySQL database still doesn't include the recent pictures and comments, only those before the wipe... is this not a big deal/something I should be worried over?

Again, thanks so much for the help.  Hopefully things will just go back to normal!

Last edited by arisidhe (02-06-2011 18:32:20)

Offline

#7 02-06-2011 21:23:07

Waccoon
Administrator

Re: mySQL/php corruption and data loss

the mySQL database still doesn't include the recent pictures and comments, only those before the wipe.

I'm not sure what you mean, here.  Are you saying there were comments on the affected pictures that disappeared at the same time the pictures did?  All comments newer than those pictures were all wiped out?  I see there's no comments on the board that are dated for February 3rd, so everything that was posted on February 3rd disappeared?

If that's the case, then I'm fairly certain that the server had a maintenance problem on February 3rd.  Whether that will happen again in the near future is anyone's guess.

One thing you may want to do is make a backup of your database using myPhpAdmin.  Go into that utility, and click the "Export" tab at the top.  At the bottom, click "Save as File," set the compression to "Zipped," and then click "Go."  This will allow you to download a complete backup of your database.  If something goes wrong, you can selectively restore certain information, such as only restoring the memberlist, only the mailbox, only comments posted before a certain date, etc.

I make a backup of my oekaki about once a month.  My host is good with data integrity, but I still prefer to have my own backups.  However, backing up all the pictures is impractical.  Don't bother, because most hosts are better at backing up files than databases.

Offline

#8 02-06-2011 23:18:32

arisidhe
Member

Re: mySQL/php corruption and data loss

Regarding the mySQL database, Wac:  Yes, it's like you said it was.  Well, there were more comments posted on both the three pictures that still kept their place on the oekaki but had the image files deleted, posted after a certain time that also got deleted.  These are the files I was talking about when I said I could see "exactly what got lost".
If you go to "phpMyAdmin" and access the mySQL database and go to the most recent comments or pictures, you'll see the ones that were lost on the 3rd... and, what worries me much more, the fact that all of the newer pictures and comments are not there.  I don't know WHERE the data for the newer comments/pictures might be going, since there's no second mySQL database or anything. 
Sorry to keep bothering you about this, but yeah, that's what's actually bothering me about this whole site "crash" thing.  I don't know what's going on in mySQL anymore and it kinda worries me.

I'll also try to do more regular backups now; thank you for the tip!  smile

Offline

#9 02-07-2011 02:36:53

Waccoon
Administrator

Re: mySQL/php corruption and data loss

If you go to "phpMyAdmin" and access the mySQL database and go to the most recent comments or pictures, you'll see the ones that were lost on the 3rd... and, what worries me much more, the fact that all of the newer pictures and comments are not there.  I don't know WHERE the data for the newer comments/pictures might be going, since there's no second mySQL database or anything.

I'm still not sure what you mean by this.  Here's what I'm doing:

1) I go to http://members.000webhost.com/login.php and log in with the information you sent to me.
2) I click "Go to C Panel", then "phpMyAdmin", then "Enter phpMyAdmin".
3) I look at the op_oekakicmt table, click "Browse", and sort by postdate descending.

Once there, I see that there's no comments dated for February 3rd.  However, I can see comments from Feb. 4th through Feb. 7th.

From what I can see, only February 3rd is missing.  Everything older and newer than that day is showing up in the database just fine.

Are you sure you're using the same login that you sent me in that e-mail?

In the "Account information" section of your CPanel, the specific server listed is server9.000webhost.com and the IP address is 173.212.215.234.  I'm hoping we're both looking at the SQL data on the same server.

Offline

#10 02-07-2011 17:19:02

arisidhe
Member

Re: mySQL/php corruption and data loss

...........Um, well, that's strange.  Everything seems to be fixed now. 
But I've been checking back on the mySQL database several times a day, and refreshed my browser and everything and for the longest time it kept showing Feb 3 entries and then nothing else... Guess it took longer to register/update than I thought?

Well, it seems to have fixed itself now, so that's good.  Sorry about that, Wac!  Yes, we're looking at the same thing, it seems, and all should be well now.  :)

Offline

#11 02-07-2011 17:28:48

Waccoon
Administrator

Re: mySQL/php corruption and data loss

Oh, yeah... that's a database maintenance issue, all right.  It looks like the data ended up going into the wrong SQL account.

I doubt this will happen again, but if it does, let me know pronto.

Offline

#12 04-01-2011 22:53:00

isaac-sul
New member

Re: mySQL/php corruption and data loss

That has been a problem with mysql, it tends to crash from time to time from various errors. The solution to which is to apply for a web hosting that would pave way for automatic database backup. There are a lot out there that have a smart back-up functionality that will help preserve data and if unfortunately they crash, there wouldn't be much discrepancies.

Offline

#13 04-12-2011 09:20:10

akali04
New member

Re: mySQL/php corruption and data loss

Microsoft SQL Server is a reliable and advanced database management system that provides you various database management and SQL database recovery algorithms. DBCC CHECKDB is one of the most advanced SQL Server commands that helps you repair corrupt database.

Offline

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB