Hack: So recently I found out some malicious code was injected into my webpages on www.OHVguide.com, I contacted my host to have them investigate. They fixed the problem removed the code and let me know that the code was inserted through a security whole in my coppermine gallery than I had manually installed year back and tried to keep it up to date as best I could, but admit I was a few versions behind 1.4.x vs 1.5.x I think about 1 1/2 years since I last updated the version.
Crash: Well long story short I downloaded the latest package, unzipped it as directed, backed up my anycontent and include files and made sure not to overwrite them or the albums folder when I uploaded the new files (I’ve upgraded coppermine on both my sites many times) but when I went to the upgrade page this time sql and fatal errors galore, not a big deal I thought i’ll just re-install coppermine though my host since they now offer it as an “easy app” and thought if I installed it into the same folder I wouldn’t have broken links and 404 errors, I was wrong. Got coppermine up and running recreated the albums, batch added all 1334 files, luckily I copied them through my webhost to a root folder so I wouldn’t have to upload them again. Most of my main links worked, but all the specific albums were listing different album numbers as reference some being non-existant even, well this wasn’t going to work I get hundreds of visitors a day and I can’t have broken links on almost 4 dozen pages that I would have to edit each by hand to fix.
Restore broken album links: After searching and searching google to find out out to change the album numbers, which apparently is given out in a numerical order for each album you create in order I couldn’t find anything on it. So I decided to look into editing the the sql php data base. Using phpMyAdmin I opened the database for my coppermine gallery found a table named cpg15x_albums “Used to store albums” I opened it and noticed the AID numbers were all different for each gallery, so one by one I changed the AID numbers to match the album number from the broken links to the right album on my new gallery, This fixed the broken links, but I still had to delete all the files from each gallery because now the photos in the gallery still reflected the old album numbering, but deleting and batch adding is a lot easy to me that updating 50 html pages by hand, took a few hours to do everything but now it all works and I have the updated version on coppermine www.OHVguide.com/gallery

Comments are closed.