Deleting G1 after migration to G2 causes problems

DonWolli51

Joined: 2005-09-24
Posts: 8
Posted: Wed, 2006-01-18 08:05

some months ago we migrated to g2 importuing all our g1-albums and photos (more than 10000 images). Now we decided that g2 really works good, contains all our photos, to delete the G1 directory. so we deleted the complete directory G1!

from now on we have found the following probs:
o a lot of pictures have disappeared from the gallery, means the entry exist but no pic is shown
o when we try to add new pictures , we get the following error:
Warning: chdir(): Datei oder Verzeichnis nicht gefunden (errno 2) in /www/km/gallery2/modules/core/classes/GalleryPlatform.class on line 1093

Warning: rename(/tmp/imgk_mk4aX9,/www/km/gallery2/g2data/cache/derivative/1/0/104770.dat): Ungültiger Link über Gerätegrenzen hinweg in /www/km/gallery2/modules/core/classes/GalleryPlatform.class on line 485

Warning: Cannot modify header information - headers already sent by (output started at /www/km/gallery2/modules/core/classes/GalleryPlatform.class:1093) in /www/km/gallery2/modules/core/classes/GalleryPhpVm.class on line 124

Gallery-Version = 2.0 Kern 1.0.0
PHP-Version = 4.3.2 apache2filter
Webserver = Apache/2.0.46 (Red Hat)
Datenbank = mysqlt 4.0.18-standard
Werkzeuge = ArchiveUpload, Exif, ImageMagick, NetPBM, Thumbnail, Gd
Betriebssystem = Linux red 2.4.21-32.0.1.EL #1 Tue May 17 18:01:37 EDT 2005 i686
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

What can we do to make it work again , except restoring three DVDs with G1???

Greetings from germany
wolfgang conzendorf

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-01-18 18:48

- is the gallery2/ folder still there and does the g2data folder still exist?
- did you import from g1 with the normal site admin -> import from g1 method or did you use add items -> from server with the symlink option?
- you should create your gallery1/ and your g1 albums/ folder again and put the .htaccess files in it. the .htaccess file that is listed in site admin -> import from g1.

 
jmullan
jmullan's picture

Joined: 2002-07-28
Posts: 974
Posted: Wed, 2006-01-18 19:20

Did you delete g2's data files?

 
DonWolli51

Joined: 2005-09-24
Posts: 8
Posted: Thu, 2006-01-19 08:13

Again, to be more clear:
1. i started with a gallery version 1.5 with more than 10000 pics and more than 300 albums . folder is gallery, albums folder is gallery/albuns
2. i installed an empty g2 in folder gallery2 with g2data in folder gallery/g2data
3. from the siteadmin of g2 i chose import and imported the g1-albums album per album
4. i checked whether all original images (not thumbs and not sized) have been imported->in g2 i found all pics as in g1
5. we worked for about three months only with g2 without any problems and did not touch g1
6. we decided to delete the folder gallery to save space on the disc and to get not confused .
7. ...and from now on we cannot insert anymore photos etc. see above

i want to get rid of the old gallery folder !!
wolfgang

 
DonWolli51

Joined: 2005-09-24
Posts: 8
Posted: Thu, 2006-01-19 08:18

i did not delete anything except the folder gallery which containd g1 and folder albums

wolfagng

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2006-01-19 08:45

> 2. i installed an empty g2 in folder gallery2 with g2data in folder gallery/g2data
you mean you've created a gallery/ folder which is now your G2 folder. and in it, you've created the g2data/ folder, right?

> 6. we decided to delete the folder gallery to save space on the disc and to get not confused .
in 2. you've said that g2data/ was in gallery/g2data/. so you deleted gallery/ and with it gallery/g2data/ ? your bad. all is lost.

 
DonWolli51

Joined: 2005-09-24
Posts: 8
Posted: Thu, 2006-01-19 10:18

sorry , of course its gallery2/g2data

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2006-01-20 20:51

if you delete the folder gallery/ , g2 in gallery2/ should be 100% intact and functional.
but all old links to gallery/ ... won't work anymore, unless you create an empty gallery/ folder which only has a .htaccess in it with the g1 -> g2 rewrite rules.

obviously you report that g2 itself doesn't work properly anymore. and that's not explainable if you've just delete gallery/ which didn't have any g2 related files in it.

you can enable "logged" debug mode, then try to add an item to find out what's wrong.

FAQ: How to set/use Gallery in debug mode?

 
DonWolli51

Joined: 2005-09-24
Posts: 8
Posted: Mon, 2006-01-23 10:22
Quote:
if you delete the folder gallery/ , g2 in gallery2/ should be 100% intact and functional.

Thats what we thought before. but meanwhile i restored g1 and this did NOT change anything, so it might also be just a time congruence and no more ...

Quote:
but all old links to gallery/ ... won't work anymore, unless you create an empty gallery/ folder which only has a .htaccess in it with the g1 -> g2 rewrite rules.

whats an old link ? we migrated all our pictures and added new ones (so it worked for some months)

Quote:
obviously you report that g2 itself doesn't work properly anymore. and that's not explainable if you've just delete gallery/ which didn't have any g2 related files in it.

thats it ! lots of thumbnails and sized images are missing (not all !) and i cannot add pics anymore ... (that all i tried till now)
so now i put g2 in debug mode and tried to add an image.
but except the error i saw before i cannot locate any other error or reason.
you can find the debug_log in www.westerweb.de/gallery2_error/debug_add_photo.htm
thanks
wolfgang

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2006-01-23 13:12

please run chmod -R 777 g2data to make sure all files in your g2data dir are writable.

@redirect from g1 to g2:
in the www, if you once had a website, there will probably also websites that point to your website to a specific page. also, search engines have indexed your pages.
if you then choose to change your website, you absolutely need to make sure that old links to your website still work, even if the location of the pages has changed.
that's what the g1 -> g2 redirect does. old links to your g1 albums still work, they just are redirected to g2.

 
DonWolli51

Joined: 2005-09-24
Posts: 8
Posted: Tue, 2006-01-24 06:54

i checked the g2data folders:
g2data: 775 g2data/albums: 775 the single album : 777 !! i think it should have worked like this. nevertheless i changed all permissions for g2data and below to 777.
then i tried to regenerate thumbs and sized for one album which resulted in the following error:

Quote:
Error

An error has occurred.

Back to the Gallery
Error Detail -
Error (ERROR_OBSOLETE_DATA) : UPDATE g2_Entity SET g_modificationTimestamp=?,g_serialNumber=? WHERE g_id=? AND g_serialNumber=? (1138084466|8|70442|7)

* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 588 (gallerystatus::error)
* in modules/core/classes/GalleryStorage.class at line 142 (mysqldatabasestorage::saveentity)
* in modules/core/classes/GalleryEntity.class at line 294 (gallerystorage::saveentity)
* in modules/core/classes/GalleryDerivative.class at line 276 (gallerychildentity::save)
* in modules/core/ItemEditAlbum.inc at line 214 (galleryderivativeimage::save)
* in modules/core/ItemEdit.inc at line 95 (itemeditalbum::handlerequest)
* in main.php at line 174 (itemeditcontroller::handlerequest)
* in main.php at line 87
* in main.php at line 80

System Information
Gallery version 2.0
PHP version 4.3.2 apache2filter
Webserver Apache/2.0.46 (Red Hat)
Database mysqlt 4.0.18-standard
Toolkits ImageMagick, NetPBM, Gd
Operating system Linux red 2.4.21-37.EL #1 Wed Sep 7 13:35:21 EDT 2005 i686
Browser Mozilla/5.0 (Windows;

when i try to add a photo i get the same error as before:

Quote:
Warning: chdir(): Datei oder Verzeichnis nicht gefunden (errno 2) in /www/km/gallery2/modules/core/classes/GalleryPlatform.class on line 1093

Warning: rename(/tmp/imgk_NN02VA,/www/km/gallery2/g2data/cache/derivative/1/0/104906.dat): Ungültiger Link über Gerätegrenzen hinweg in /www/km/gallery2/modules/core/classes/GalleryPlatform.class on line 485

Warning: Cannot modify header information - headers already sent by (output started at /www/km/gallery2/modules/core/classes/GalleryPlatform.class:1093) in /www/km/gallery2/modules/core/classes/GalleryPhpVm.class on line 124

the whole gallery resides in an intranet without any links ouside the gallery itself and provided by gallery itself.

cold greetings from germany (-5C this morning and a wet wind)
wolfgang

 
DonWolli51

Joined: 2005-09-24
Posts: 8
Posted: Tue, 2006-01-24 07:36

valiant, i set lang English and again copied the last errormessage for you (dont know whether you understand german):
Warning: chdir(): No such file or directory (errno 2) in /www/km/gallery2/modules/core/classes/GalleryPlatform.class on line 1093

Quote:
Warning: rename(/tmp/imgk_CKn9RP,/www/km/gallery2/g2data/cache/derivative/1/0/104914.dat): Invalid cross-device link in /www/km/gallery2/modules/core/classes/GalleryPlatform.class on line 485

Warning: Cannot modify header information - headers already sent by (output started at /www/km/gallery2/modules/core/classes/GalleryPlatform.class:1093) in /www/km/gallery2/modules/core/classes/GalleryPhpVm.class on line 124

 
DonWolli51

Joined: 2005-09-24
Posts: 8
Posted: Tue, 2006-01-31 08:42

at last, i could NOT find or SOLVE the problem.

WORKAROUND
i restored the folder g2 from the last known ok-version
and tested it with the existing (still the same) g2-database
and
.... it worked !

nevertheless i dont like gallery to have destroyed albums and a destroyed command interface
and the feeling that it can happen every day again it not so good !

thanks to valiant

wolfgang