PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Classifieds Installation & Upgrades (http://www.photopost.com/forum/classifieds-installation-upgrades/)
-   -   Upgraded from v2.42 - 3.03: Images vanish, database damaged (http://www.photopost.com/forum/classifieds-installation-upgrades/138010-upgraded-v2-42-3-03-images-vanish-database-damaged.html)

websissy September 29th, 2008 12:17 PM

Upgraded from v2.42 - 3.03: Images vanish, database damaged
 
Hello, Chuck,

Well, like the user who reported this problem: http://www.photopost.com/forum/class...2-5-3-2-a.html, I tried to upgrade from 2.42 to 3.03 over the weekend. In fact, when it ended up broken and screwed up the first time, I restored from my backup, double-checked everything and tried again. But in the end the results were the same.

Here is a detailed list (with examples) of the problems I found after the upgrade to a classifieds system that was running fine before:

Images associated with each classified through the bigimage columns in the product table (i.e. the ad image and thumbnail and any additional images but NOT those that were embedded in the BODY of the ad using UBB Code) had all disappeared after the upgrade. That means I get no image thumbnails anywhere in the classifieds. I have attached an example of what my category page now looks like for categoory 31.

I note here that during this upgrade the script tries to move ad-associated images from the classifieds/data/ad# directories into "Thumb" and "Large sub-directories INSIDE the /data/ad# directories; but it does not do the same things with the category level data directories. It's the names of images in the category-level directories that seem to be damaged here. The script seems to be messing up image names. Here's an example of the way the image names in the category 31 data directory looks after the upgrade:

Code:

Content visible to verified customers only.
and here is an example of what the image name in the html code for ad 41 (which is in category 31) looks like after the upgrade (notice what happened to the image name for 153TomeGallery.jpg):

Code:

Content visible to verified customers only.
And for the record, here's the mysql query I ran and the way the classifieds database products table row for ad 41 looks after the upgrade:

mysql> select id, bigimage from ppcl_products where id = 41;
Code:

Content visible to verified customers only.
Obviously, I did nothing to cause this (that I KNOW of anyway). Clearly the script went wrong somehow.

In addition to the above issues, I had the same experience as the poster in the other thread I referenced. My config-int.php and config-inc.php files did not get updated even though both files were double-checked before the upgrade to ensure their permissions were 777.

Also, related to the problem the other user reported with getting php errors because things weren't where the program expected them to be, I discovered that the paths to where things were supposed to be in the options section and the config section in the classfieds admin pages had all been wiped out. Once I repaired those paths and set them right again, my template (which had also vanished) and my page headers and footers all-reappeared.

I hope this helps you figure out what went wrong. If I can answer any further questions, please don't hesitate to call me directly at 575-838-0784. In the meantime, I'm going to wait a couple of hours before I use my backup to roll my classifieds back and reinstall the older version.

Thanks! Let me know if I can help, please!

P.S. For some reason, the attachment didn't take so I'm adding it here instead.
Code:

Content visible to verified customers only.

Chuck S September 29th, 2008 07:01 PM

Hello

The issue as I see it is that the 2.4 upgrade was ran more than once. You can restore the products table from your mysql backup and then run your upgrades from 2,4 forward only once.

websissy September 30th, 2008 07:20 AM

Quote:

Originally Posted by Chuck S (Post 1233240)
Hello

The issue as I see it is that the 2.4 upgrade was ran more than once. You can restore the products table from your mysql backup and then run your upgrades from 2.4 forward only once.

It looks like you were right, Chuck. I'm not certain that a rerun of the 2.4 upgrade is exactly what happened; but it's certainly possible. When I ran that first upgrade and it began throwing all kinds of mysql messages up on the screen, I basically panicked and stopped the thing to see what had happened. In the confusion that followed (it was late at night and I was tired) I could well have rerun the 2.4 upgrade without fully realizing the consequences of doing so. We'll call this my '3rd mistake'. I'll point out mistakes 1, 2 and 4 in a moment.

When I didn't hear from anyone within a few hours yesterday, I decided to go back and carefully restore and retest the tables, files and programs for both Photopost and the Classifieds at their earlier release levels to confirm that the roll back had worked. I made a full account-save backup before installing PhotoPost upgrades on Saturday but neglected to make one afterwards. This was clearly my 1st and biggest mistake. I knew I needed backups but failed to make one after installing the Photopost upgrades. So yesterday I decided to roll back both upgrades and start completely over.

After I originally had trouble with the Classifieds upgrade on Saturday and decided to roll back and try again, I opted not to go "all the way back". In hindsite, that was obviously my 4th mistake. Instead, I tried to do a "selective restore" by only rolling back the Classifieds. Trouble was really brewing now. I was taking shortcuts. (Can you tell I was tired and judgment-impaired?)

This time I made a specific point of dropping all tables for both apps and I only reloaded the tables that existed before the upgrade. On my first rerun attempt on Saturday, I had overlooked the possibility that the Classifeids upgrade could have created new tables of its own and thus failed to drop any new tables that were created during the first upgrade before I tried the second time.

Once the two-product rollback was complete and I'd done enough testing to confirm both apps worked again, I then ran the Photopost upgrade and stopped and carefully tested it after the install. When it had been tested and looked good, I made the missed (after Photopost) backup that I failed to make on Saturday and installed the Classifieds upgrade again.

This time the upgrade was successful and things looked almost normal afterwards. Clearly I should have made that extra backup; because my attempt to do a partial roll back had only made things worse! :o

The bottom line is when I ran the classifieds upgrade this time it went better and I actually could see my images when it was done. Hurray! I was, however still missing my template though (as I was after the first upgrade) and the vbportal sidebar was missing too.

When I looked around afterwards, I realized one of these upgrades had added a new config table named config-intc.php that I had deliberately NOT uploaded in the prior 3 upgrades because I thought it duplicated one of the existing config tables and didn't want to overwrite them. This was unquestionably my 2nd mistake. Only after this third "almost worked" upgrade did I finally realize this file should have been uploaded too and that it needed to be setup correctly and have 777 permissions like the other config tables before the upgrade began.

When I added that file to the completed upgrade and set its paths and urls the way they should have been set BEFORE the upgrade, my template and all the other elements of VB and vbportal integration that were all missing after the FIRST upgrade all magically reappeared again.

It was only AFTER I had done all of this that I took a minute to peek at email again and found your reply, Chuck. You were right. I screwed up in several ways. You may now feel free to kick my butt in public if you wish. :o

So, what did I learn from this experience?

First, Photopost Classifieds provides no documentation or written procedure for how to install their upgrades. The user is on his own when it comes to figuring out the 'right way' to upgrade. No mention is made of new tables that have been added or of new config files that have been created and should be properly setup before running the upgrade. Also, no mention is made of required permissions that should be set for new files added during upgrades. The user must pay careful attention. This is not a 'late night exercise' or a place for those who are tired and not cross-checking every detail. The goblins 'll git-cha if ya dont watch out! :p (Mea Culpa!)

Second, Classifieds' upgrade scripts tend to display a bunch of mostly-meaningless mysql messages on the screen as they run whereas Vbulletin's, vbportal's and photopost's scripts almost never display such messages. :confused: If all you see is Successful completions at the ends of these messages, there's no need to worry. If you see what are clearly errors, DO worry and start asking yourself what you did wrong. But don't panic just because you suddenly see a bunch of scary messages flash by on your screen. :eek: Stop... Take a deep breath.... Clean out your shorts... and then carefully read those messages. They might not be as scary as they look and even if they are, they'll help keep you awake and doubting your sanity which is always a good thing when you're installing a bunch of upgrades anyway. :rolleyes: Let the upgrader beware and very careful!!

Third, when upgrading one can NEVER make enough backups. Duuuh! :o Don't be stupid. Even with products coming from the same vendor make an extra backup between the product upgrades. No two programmers think alike when it comes to such things. I don't CARE if you've already made 37 full backups. Make the 38th, damn it! ;)

Thanks, Chuck. I appreciate your help, your patience, and your support.

Best Professional Regards,
Greg

websissy September 30th, 2008 12:58 PM

The upgrade worked almost perfectly on the 4th try! :D

Thanks again, Chuck! ;)

Chuck S September 30th, 2008 01:02 PM

Yes things are never as bad as one thinks backups are always essential. We do have upgrade documentation which is in the documentation folder of the download by the way. Essentially its pretty much the same as any other program upload the files and run an upgrade script.

Chuck


All times are GMT -5. The time now is 10:41 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97