View Full Version : Image Count Error
sp33d
12-08-2007, 10:42 PM
Out of over 33,000 images and about 5,000 active garages we have 15 database records that have an incorrect image count listed in the "images" column. Most of them are listing 4294967295 though a couple have 4294967294 and one or two other odd numbers.
When did this occur? Do you have a back up? And where is your forum?
sp33d
12-09-2007, 02:14 PM
I don't know when it occured. One of our users just brought it to my attention a couple days ago. The last change to the software though was the upgrade to 10.0.4 a couple months ago.
While we have backups I don't see the need for them. It took me about 15 minutes last night to write a maintenance script to correct those numbers based on image counts in the image table.
I just wanted to bring it to your attention since something is not functioning 100% somewhere.
I have not had a report of this from anyone as of yet. It appears that your DB may have had that table's column corrupted if we can't find another instance of the error.
So, at this time, all I can really do is see if this thread brings more occurrences of this error to our attention.
I'm glad you fixed it. You saved me coding a script at least.
I beat on the gallery here pretty hard with test code and I often use my other live forum for testing. After backups of course. So like I said, I'm not down playing this, I will look for more instances of the error so we can sort it out if it was not unique to you.
sp33d
12-09-2007, 03:23 PM
My maintenance script will report image count discrepancies to me so if there is a difference in the future I'll let you know. I do know we went through a major upgrade (php, mysql, and windows) back in late October which caused us quite a few problems so it may be related.
Please keep us posted and thanks for the great feed back. I appreciate it.
TeamBHP
01-26-2008, 07:12 AM
Hi,
Exactly the same problem has occured on my board (http://www.team-bhp.com/forum/indiancarpictures/list/).
Look in the link provided above, you will see some galleries listing the same number "4294967295".
Could you help me out with the relevant script please? Thanks
bigH2O
01-26-2008, 10:40 AM
Don't know if this helps noppid, but 4294967295 is the decimal equivalent of the maximum limit of a 32 bit binary number, the equivalent of 1111 1111 1111 1111 1111 1111 1111 1111 in binary. Looks like some sort of a buffer overflow situation going on, or some rarely hit code throwing something into a loop that pegs out the counter.
Did you try to edit the gallery and see if it fixed it or changes it? Is the DB ok?
It shouldn't be hard to fix if it's corrupted, but I've never seen this one yet. I don't know what occurred with the member that started the thread.
sp33d
01-26-2008, 07:22 PM
I have not been able to figure out what is causing it but it does still happen occasionally. It's not a big enough deal for me to track it down since our script fixes it each night when it does occur.
I'll try and duplicate the error and see what happens. Not sure what it is, but I have some ideas to try.
thanks
Thanks for letting me know... I looked at it again today, but I can't really do anything.
I don't know the vbpicgallery structure too well, and the last thing I want to do is tamper with the raw sql files.
James
Ok, I had to re-read the thread to see what's up. Sp33d fixed it himself, so there is not a utility in the package to fix this.
You will need a utility to fix that. You need to grab each existing gallery, get the image count for each gallery, and update the count on each gallery.
I'm more concerned where the issue came from as only two reports of this have come in and the first one had a known damaged database due to mysql upgrades. So while fixing it is not a problem, the problem we are fixing is not clear.
I have no idea how to do that, unfortunately... Also - Is there a way to go back to 10.0.2, then?
I guess you could. However, there were a few required or necessary upgrades since then. So we would kinda be stuck. I won't fix an old install.
If this is your only problem, ignore it a few days. I can't work for free while others get paid and I won't have time to make a script for this right away.
It's not a fatal error. We are talking about the image count, correct? I seem to recall you had another issue too?
sp33d
01-29-2008, 09:14 PM
[QUOTE=noppid;23863I'm more concerned where the issue came from as only two reports of this have come in and the first one had a known damaged database due to mysql upgrades. So while fixing it is not a problem, the problem we are fixing is not clear.[/QUOTE]
It's happened several times since with no known database issues. While we were having some software problems on our server we only had a couple tables corrupt and none of them were related to vbpicgallery.
To me it looks like just an image count error, but apparently my client is getting a MySQL error as well when someone uploads a photo.
Ya, I don't know how large of an issue this is... I went through the gallery and it seems that the image count is off for two, and I don't know how large of an issue this is considering everything else looks fine.
I am not able to look at it right now. But, the image count is an relatively easy fix.
I think the mysql error is a missing column. See post 3 of the download thread for a fix. http://www.cpurigs.com/forums/showthread.php?t=4375
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.