PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Photopost Pro Installation & Upgrades (http://www.photopost.com/forum/photopost-pro-installation-upgrades/)
-   -   PhotoPost Upgrade Problem - Need Help Restoring DB! (http://www.photopost.com/forum/photopost-pro-installation-upgrades/121650-photopost-upgrade-problem-need-help-restoring-db.html)

mkdevo December 20th, 2005 06:59 AM

PhotoPost Upgrade Problem - Need Help Restoring DB!
 
i finally got around to upgrading photopost this morning (4.8 > 5.21). after i ran the upgrade (all seemed to go well during the process), none of my thumbnails or images were showing up, so i ran a scandb. during this, it said 'could not find xxxx.jpg' for ALL of my images, and removed them all (even though there's still about 500mb worth of photos in my data directory)!

so i need to restore my photopost db from a backup. problem is, i have photopost in the same db as my vbulletin, sooo...

- can i do this restore in phpMyAdmin?

- what table(s) do i need to restore, and what chunks of my backup do i need to use?

- is that all i need to do? if not, what else?

thanks in advance for the help.

Chuck S December 20th, 2005 07:58 AM

You just need to restore the photos table and rerun the upgrade.php script. Yes phpmyadmin restore will work

Make sure to only run the 485 step3 upgrade script ONCE

mkdevo December 20th, 2005 07:45 PM

thanks chuck, another problem now..

i restored the photos table and started the upgrade process again. when i got to 50 step1, i got the following errors:

Quote:

Preparing to update database...

Error performing MySQL command: ALTER TABLE Phpost_categories ADD ismember SMALLINT(1) default '0' NOT NULL
Error: Duplicate column name 'ismember'

Error performing MySQL command: ALTER TABLE Phpost_categories ADD albums TEXT AFTER children
Error: Duplicate column name 'albums'

Error performing MySQL command: INSERT INTO Phpost_settings VALUES (207,'Original Image storage directory URL','origdir','Typically this path matches your DATA directory URL, unless you want to store your original images seperatly from your thumbnail/medium images','http://www.thebreakfast.info/photopost/data',34,1)
Error: Duplicate entry '207' for key 1

Error performing MySQL command: INSERT INTO Phpost_settings VALUES (208,'Orignial Image storage directory server path','origfull','Typically this path matches your DATA directory server path, unless you want to store your original images seperatly from your thumbnail/medium images','/home/www/thebreakfast/photopost/data/',35,1)
Error: Duplicate entry '208' for key 1

Error performing MySQL command: INSERT INTO Phpost_settings VALUES (209,'When using on-the-fly image generation, do you want to overlay the watermark image?','overwater','You can use this feature for on-the-fly watermarks in combination with the on-the-fly image generation.','no',30,5)
Error: Duplicate entry '209' for key 1


Warning: unlink(/home/www/thebreakfast/photopost/adm-userg.php): No such file or directory in /home/www/thebreakfast/photopost/upgrade.php on line 2097

Warning: unlink(/home/www/thebreakfast/photopost/adm-approve.php): No such file or directory in /home/www/thebreakfast/photopost/upgrade.php on line 2098

Warning: unlink(/home/www/thebreakfast/photopost/adm-db.php): No such file or directory in /home/www/thebreakfast/photopost/upgrade.php on line 2099

Warning: unlink(/home/www/thebreakfast/photopost/adm-menu.php): No such file or directory in /home/www/thebreakfast/photopost/upgrade.php on line 2100

Warning: mysql_query(): Unable to save result set in /home/www/thebreakfast/photopost/pp-inc.php on line 289
Home · Search · Register


gallery Message
We're sorry, but the system experienced an unrecoverable error. Please try again later.
is it possible that i need to restore all the photopost tables? thanks again.

Chuck S December 20th, 2005 08:22 PM

don't worry about duplicate errors

In your upgrade.php add this at top and run any missing upgrades

define( 'THIS_SCRIPT', "upgrade" );
$skip_exheader = "yes";

mkdevo December 21st, 2005 05:41 AM

ok, i've done that.. i ran the 5.0x to 5.1 script and got the same results. i then ran the rest of the upgrades, which seemed to work (all i got were duplicate errors), but now when i go to my photopost index, the categories and everything look correct, but all the photos say 0, and below the categories, i have this:

Quote:

Warning: mysql_query(): Unable to save result set in /home/www/thebreakfast/photopost/pp-inc.php on line 289
Admin · Home · Search · Profile · Upload Photos


gallery Message
We're sorry, but the system experienced an unrecoverable error. Please try again later.

Script:

Query: SELECT id,user,userid,cat,storecat,title,bigimage,height,width FROM Phpost_photos WHERE approved=1 AND storecat=0 ORDER BY date DESC LIMIT 29

Result: Got error 124 from storage engine

Database handle: Resource id #56

Chuck S December 21st, 2005 08:16 AM

Yep there is your issue

Result: Got error 124 from storage engine

Your out of site space.

1. Take care of that by deleting files or buy more space

2. run a repair on all database tables

3. then finish and run the upgrades on photopost needed

mkdevo January 5th, 2006 09:04 AM

hi sorry for the delay.. just getting back to this.. i've done everything you said to do, but when i try to repair the db, it still wants to delete all the photos from my database, even though the photos are definitely in the physical locations that are referenced in the table...

any ideas? i'm still without a gallery. :(

Chuck S January 5th, 2006 10:13 AM

Did you get more storage space?

repairing your database will not delete the photos. You need to make sure you get past the space issue then restore a known good backup of the photos table and run the needed upgrades. You should be fine after this. Only rebuilding thumbnails that are missing will drop photos from the photos table and this is because a step was ran more than once. Restoring the database and rerunning the upgrade steps once is the required action here.

mkdevo January 14th, 2006 11:11 AM

ok, space was never an issue. i have plenty of space available, so i'm not sure where that error is coming from..

i have restored a good backup of the photos table.

which upgrade script do i need to start on now though? like i said, i was running 4.8, but the admin panel is now reporting that the version is in fact 5.21..

Chuck S January 14th, 2006 11:26 AM

Well that is what your mysql was reporting space issue ;)

Okay well simply rerun every upgrade ONCE from 4.8 forward. Do not worry about any duplicate errors or such just go all way through one time. You will get duplicate mysql errors and you may get can not delete old file errors since you already ran the upgrade script before.

mkdevo January 14th, 2006 12:45 PM

here's where i'm at now:

- i started running the upgrades from 4.8 on.

- when i hit the 50 step 1 upgrade, i got the same thing i listed in post #3 above. (again, with no option to continue upgrading.)

- i went back to the main upgrade menu, and selected 5.1 to 5.11.

- ran the final upgrades. everything ok, except a couple duplicate errors.

- now my main photopost page looks promising (better than before), but still reports 0 photos in every category (and 'last photo uploaded' = no photos).

- the recent comments block at the bottom shows the last 5 comments with tiny thumbnails, and 'photos' under 'statistics' reports the correct # of photos.

- when i go into a category, i see this message in the middle of the screen:

Quote:

Warning: mysql_query(): Unable to save result set in /home/www/thebreakfast/photopost/pp-inc.php on line 289
followed by the 'gallery message':

Quote:

We're sorry, but the system experienced an unrecoverable error. Please try again later.

Script:

Query: SELECT id,user,userid,cat,storecat,title,bigimage,height,width FROM Phpost_photos WHERE approved=1 AND storecat=0 AND cat IN (535,546) ORDER BY date DESC LIMIT 29

Result: Got error 124 from storage engine

Database handle: Resource id #62
- all photo 'records' are showing, with uploader, filesize, dimensions, etc, but the photos and thumbnails themselves are not appearing.

Chuck S January 14th, 2006 12:52 PM

Here we go with this again

Result: Got error 124 from storage engine

Database handle: Resource id #62

Try running a repair on your mysql tables expecially photos

REPAIR TABLE Phpost_photos

After you get rid of this you can rebuild counts in admin to get the counts right

mkdevo January 15th, 2006 07:46 AM

ok, i'm almost there...

- a google search confirmed that Got error 124 from storage engine is indeed NOT a space issue. i'm looking at this:

Quote:

Description:
The problem seems to be myisam specific and is only triggered after a fresh import. A dump file which displays the problem is attached, OasUser.sql. The problem does not occur if you import the table as an InnoDB table.

How to repeat:
bash#mysql test < OasUser.sql
mysql>select firstname from test.OasUser order by firstname limit 1;

Interestingly, rebuilding the table fixes the problem:

mysql>alter table OasUser engine=myisam;
mysql>select firstname from OasUser order by firstname limit 1;
- lo and behold, i refreshed the photos table as InnoDB - the error no longer displayed, and all photos and thumbnails were there, in tact.

- i also rebuilt the table to myisam, and the photos and thumbnails remained in tact, with no error messages.

BUT...

- all photo counts in all categories remain at 0. the correct number of photos is displayed in the stats, but that's it. i ran recalculate photos/posts numbers and check children a couple times, which returned the following:
Quote:

Processing may take a while... please be patient and wait the for FINISHED message...

Preparing to update categories with photo and posts information...

Preparing to update personal albums with photo and posts information...

Finished!

click here to return to admin
but the counts all still remain at 0.



EDIT: just ran the above for a 4th time, and the counts are back!! wow.. looks like we're all set (fingers crossed).. thanks again, chuck..

Chuck S January 15th, 2006 09:01 AM

Yep your counts where 0 from the cache ;)

Once your cache time out was reached your page refreshed.


All times are GMT -5. The time now is 11:07 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