Hello all,
I have a pretty odd problem and I think the only way to resolve it is going to be starting a whole new database with Coppermine. I figure I will give it a shot here though just in case there is a fix out there.
I am running VBulletin 3.50, VBadvanced 2.x, and Coppermine 1.42 stable.
I have a working script that I found on the vbadvaced websites called crandom.php that will pull images from the Coppermine database and it works just fine for what I need. I started noticing that it was bringing up images that fail on a random occurance and tore through the code up and down to make sure I didn't screw something up, I ended up hard coding it to a specific directory within my /albums folder. This led me to more pouring through code to figure out what was going on and I came up with the problem after awhile of taking it all in.
It seems that when I first was setting up Coppermine and learning how it all functioned, I decided before I got too far into it to delete all my albums and such and essentially start from scratch (or so I thought.. wrong).
I run a 4x4 off roading site and decided that I wanted to organize the pictures within my /albums folders.. so I changed stuff around, renamed some folders and then once I was happy with my folders within /albums, I set about going back into Coppermine and adding all my albums, Galleries and whatnot. My Coppermine galleries work PERFECT, never a missing image or anything weird.
Now factor in this crandom.php. From what I can tell it is reading directly from the database and basically it is finding traces of the very first setup I did within Coppermine, and is attempting to poll images from directories that no longer exist.
Example: In my /albums folder I had used to have a much of folders dated 12-28-05 and similar. When I cleaned up I created folders called Wheeling, Projects, etc..... Well during cleanup I moved that 12-28-05 folder into the Projects folder, and renamed it 12-28-05-weekend to make it easier to figure out when I was batch adding it.
Problem is I have the crandom.php hard coded to only look for random images in the /albums/wheeling folder, yet about 25% of the time it appears to be attempting to pull the folder 12-28-05 folder from there and it doesn't even exist... it is now in /albums/projects/12-28-05-weekend and the script shouldn't even know it ever exists.
So what I came up with it that there are still traces of the very first (tables?) in the database somewhere that Coppermine ignores, but this script somehow sees.
My question (I know finally) is simply this. Is there any kind of script out there that can search the Coppermine database for bad entries/non existant data/pictures and then proceed to prune them out of the database ?
What makes this hard is I have no idea roughly how many entries are in there that are wrong. I have gone into the database via myphpadmin and searched for the file name that the script is attempting to pull hoping to find dulicate entries (one being bad), but I only find one entry. I don't want to delete this because that image is correct, just in a different place.
I am thinking I am going to be stuck creating a whole new database and adding all my images back into it.. which is not exactly something I want to do.
If you want to see this in action here is all the info:
Coppermine is installed here:
http://www.truckporn.com/picsThe Crandom.php is here:
http://www.truckporn.com/pics/crandom.php (You may have to hit refresh a few times to get a broken image, or a working one)
My current crandom.php can be found here:
http://www.truckporn.com/crandom.zipHere is a link to the Crandom thread on vbadvanced with my posts around the bottom:
http://www.vbadvanced.com/forum/showthread.php?t=1523Thanks in advance for any help... I know this is a long winded deal.