View Full Version : Moved to other server: mysql error
March 21st, 2006, 08:02 AM
I got myself this problem when I want to look at a gallery:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /media/showgallery.php on line 94
and get the message that I am not allowed to look at the gallery.
This is what I did:
- moved photopost to another server (not the database!)
- thumbnails did not show up, images did
- made a backup for photopost database
- upgraded 5.21 to 5.3 (hoped it would solve the problem)
- all images were lost
- placed backup back
- and now I have this error
I did triple checks on configuration variables, but I have no clue on what is happening. All worked fine before moving to new server.
Please help me! B=0
March 23rd, 2006, 12:39 PM
Please help? :( It would be a waste of all the categories and photo's to do a new fresh install...
March 23rd, 2006, 01:07 PM
Well the categories query is failing here
list( $thecatid, $thecatname, $catthumbs, $cattype, $catparent, $cattheme, $thumbtype, $catsortorder, $frames, $hasintro, $catinfo['introtitle'], $catinfo['introcopy'], $ratingtype, $takevotes, $ismember, $notify ) = mysql_fetch_row($ctitleq);
Did you run the upgrade script when going from 5.2 to 5.3? Are all the photopost tables present on the new server.
March 23rd, 2006, 01:08 PM
By the way I am looking at your gallery and do not get this error.
March 23rd, 2006, 01:25 PM
Appearantly the error is gone...??? Can this happen just by itself. Did a cronjob something?
Just the photo's are missing now...they are on the server but not showing up in the gallery.
On server: http://media.gamevillage.nl/media/data/506/
Is there a way to restore this?
Did you run the upgrade script when going from 5.2 to 5.3?
Yes, I ran the correct update script...
Are all the photopost tables present on the new server.
Database is the only thing I did not move. All scripts and photo's did move to the new server. Storage options have been set correct (just checked again :D ) and URL to PhotoPost data directory has also been set correct to http://media.gamevillage.nl/media/data
Any clues? :(
March 23rd, 2006, 01:28 PM
If you want to properly upgrade Photopost the old database tables would have needed to be there.
The only way to get your photos back would be to restore the photos table from the old install to the new.
This was only a move from 5.2 to 5.3 right?
March 23rd, 2006, 01:31 PM
Yes it was 5.21 to 5.3. Would it hurt to do the upgrade again? I think I have 5.3 scripts with a 5.21 database now...
March 23rd, 2006, 01:39 PM
Your database looks fine but you dont have any photos in the photos table which is why I suggested restoring the table and you might want to check you updated your data and uploads paths in admin to the new paths.
March 23rd, 2006, 02:00 PM
I allready triple triple checked all config data; what exactly do you mean with restoring the table? :s
March 23rd, 2006, 02:02 PM
Your photo table is empty right you would need to restore the photos table from your old install to get the photos back.
Use phpmyadmin or such and restore the photos table inserts to the database
March 23rd, 2006, 02:16 PM
I don't use phpadmin, I use ssh. And I feel like a real noob here...I don't know how to do that? And perhaps I am misunderstanding, but I did not move the pp database, nor changed it (perhaps the upgrade did, but I did put the backup I made back).
March 23rd, 2006, 02:21 PM
I just put the database backup back again and guess what...the error is also back
March 23rd, 2006, 02:28 PM
Whatevery database you are restoring has no photos table entries
You need to restore a photos table that has photo inserts
March 23rd, 2006, 02:33 PM
ok...since that was my only backup, that means it is not possible to get the photo's back inplace...although the photo's are in the right directories?
March 23rd, 2006, 03:11 PM
Not if you do not have a backup of the inserts in the photos table no.
The files on disk are just that files. The SQL INSERTS in the photos table of photopost are the real stuff that tells photopost there is a photo and where to find it on disk. You need that info. Looks to me like the backup you took from your old install was not all the stuff you needed.
If you have access to the old site still you could grab another copy.
March 23rd, 2006, 04:02 PM
All server and sites are still in my possession. The database is still on the old server. I made the backup of the database before I upgraded. Appearantly something went wrong when backing up the database? I used this command /usr/local/mysql/bin/mysqldump -q -u minder -p gv01media > backuppp01.txt
and put it back with this command /usr/local/mysql/bin/mysql < backuppp01.txt -u minder -p gv01media
So I understand that before the backup the database contained a photos table that was lost making the backup?
March 23rd, 2006, 04:43 PM
Look at your database backup to see if there are photo inserts present in the photo table
You need to have a photos table restored that actually has photos for photos to appear on your gallery ;)
March 23rd, 2006, 04:55 PM
-rw-rw---- 1 mysql mysql 0 Mar 23 20:13 pp_photos.MYD
-rw-rw---- 1 mysql mysql 1024 Mar 23 20:13 pp_photos.MYI
-rw-rw---- 1 mysql mysql 9794 Mar 23 20:13 pp_photos.frm
is this something like a phototable? :s
March 23rd, 2006, 05:01 PM
wait...that is the current database (the backup being restored)
March 23rd, 2006, 05:08 PM
I have the backup online now; is it save to post a link to the backup here (as a .txt) so you can look at it or is there any crucial information in it like passwords? My knowledge of mysql backups is not going that far :D
March 23rd, 2006, 05:53 PM
I would suggest you install phpmyadmin so you can look at what your doing ;) and see what I am telling you. You might be restoring a photos table but the table your restoring has no photos. Thus you need to grab a backup of a photopost photos table that has photo inserts and restore that.
If you restored a photos table to your current Photopost that had photo inserts in it you would have photos for example showing here
You do not.
By the way mysql backups are stored in a file example backup.sql usually not in a txt format so you might want to name your backups accordingly
October 8th, 2006, 07:46 PM
Things seem to be humming along nicely now. Thanks for all your help. I know it gets frustrating answering the same questions over and over, but Photopost really is a great product. It is the perfect compliment to vBulletin when it comes to building community.
And one final unrelated question: What is phototable.sql that's in the /data directory? I've googled and gone through the documentation and can't figure out what in the hell this thing is. Mine is over 250 mb.
October 8th, 2006, 07:55 PM
we have no phototable.sql in our program in a data directory. You sure you did not place some mysql backup there by mistake
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.