Migrate from Windows --> Linux

mackis5

Joined: 2005-04-25
Posts: 22
Posted: Tue, 2005-05-24 19:21

Hi,
I am about to change my environment. I am using apache 2 (latest) on windows, with mysql 4.1.12, and newest php 4.
My new installation environment is in my footer.

How can I move my G2 gallery? I have tried to move g2data (both with all folders, as well as only the "albums"), as well as the DB. I changed file permission with chmod -R 777. This was impossible to update, so I decided to make an installation from scratch.

Can I make a db transfer for the USERS as well as the gallery so I dont have to start from scratch? Can I move my whole g2data incl all folders inside and not just the "albums"?

My new installation went very smooth when I made it from scratch.

Thanks!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-05-24 19:35

a windows -> linux change is easy. it's the same as migrating from one server to another. see the FAQ link in my forum signature. one of the last questions in the FAQ ("Q: How can I move my gallery installation from one server to another? ").

you don't only can, you have to move the whole g2data folder to the new server.
also copy the complete database. just follow the steps in the FAQ...

 
mackis5

Joined: 2005-04-25
Posts: 22
Posted: Tue, 2005-05-24 23:20

Thanks for your answer.

First just a short description what I did.

1) updated my old gallery with the latest build
1.1) deactivated rewrite module
2) took a backup of the DB, into an SQL script.
3) zipped my g2data folder with every folder inside.
4) Created a new DB on my Linux and run the sql script from above.
5) created a /var/www/html/g2data on the linux and unzipped the g2data.zip into this.
6) chmode -R 777 g2data
7) Downloaded the G2Beta3.tar.gz and the latest build and extracted them to /var/www/html/myroot/gallery2, and then chmod -R 777 gallery2
7 Pointed my web browser towards http://localhost/gallery2/install
Everything went smooth until step 8:

-----

Unable to initialize our Gallery data
Install Other Modules

The following modules can be automatically installed and activated for you. You should install at least one of the graphics toolkits otherwise Gallery can't make thumbnails out of your images. On most systems, the automatic install will work properly for you. However, in some cases it may fail. You can always activate new modules or deactivate any of the ones you choose here on the Site Administration page, so any decision you make here is not permanent.

Some modules may fail to install automatically. That's ok. It typically means that they require some configuration, which you can do on the Site Adminstration page

----

If I continue on the menu to the left (since there is no continue button at step 8 since it failed), I pass everything. When I then try to access my gallery2, this is what is showing:

---

Error
Error (ERROR_STORAGE_FAILURE, ERROR_UNKNOWN) :

    * in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1166 (gallerystatus::error)
    * in modules/core/classes/GalleryStorage.class at line 220 (mysqldatabasestorage::search)
    * in modules/core/classes/Gallery.class at line 223 (gallerystorage::search)
    * in modules/core/classes/helpers/GalleryPluginHelper_simple.class at line 268 (gallery::search)
    * in modules/core/classes/helpers/GalleryPluginHelper_simple.class at line 209 (gallerypluginhelper_simple::fetchallparameters)
    * in modules/core/classes/GalleryCoreApi.class at line 216 (gallerypluginhelper_simple::getparameter)
    * in modules/core/classes/Gallery.class at line 541 (gallerycoreapi::getpluginparameter)
    * in modules/core/classes/Gallery.class at line 513 (gallery::getactivelanguagecode)
    * in init.inc at line 125 (gallery::inittranslator)
    * in main.php at line 70
 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-05-25 08:03
Quote:
7) Downloaded the G2Beta3.tar.gz and the latest build and extracted them to /var/www/html/myroot/gallery2, and then chmod -R 777 gallery2

what is "the latest build"? why do you need two g2 codebase versions? g2beta3 and "the latest build"?

you say you passed the core install step? it should just have jumped over it. before the core install step, it writes the new config.php. including the database connection details.
but the error above says that there was a error when getting something from your database.
you could try the following:
go to localhost/gallery2/README.html and there you'll find the most important links of your G2, you need to go to site admin and from there to site admin -> modules to uninstall (not only deactivate) the toolkits. then install them again.

if that fails, you can a) uninstall them manually by manipulating the database manually.
or b) uninstall the toolkits on your old host, backup everything again and move again.

 
dj-3plet

Joined: 2005-03-12
Posts: 70
Posted: Sun, 2005-07-17 03:08

i'm having exactly the same problem with exactly the same error. i followed the faq. i upgraded my test site to g2b3 (no "latest build").

- Apache 2.0.54
- MySQL 4.1.12
- PHP 4.3.11
- Mandrake 10.1

 
dj-3plet

Joined: 2005-03-12
Posts: 70
Posted: Sun, 2005-07-17 11:59

also, before i moved g2, i uninstalled ALL of the modules.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-07-17 12:19
 
dj-3plet

Joined: 2005-03-12
Posts: 70
Posted: Sun, 2005-07-17 12:35
Quote:
* 5. If you're moving from a windows based server to a *nix (unix, linux, ...) based server, you will have to change each database table name from lower case (e.g. g2_albumitem) to a case-sensitive name (in this example g2_AlbumItem).

oops, missed that one. i'll try that now and report back. thanks.

 
dj-3plet

Joined: 2005-03-12
Posts: 70
Posted: Sun, 2005-07-17 13:22

SUCCESS! but what a pain. is there any way to automate that? also, all the thumbnails were broken (easy fix at /lib/tools/test), but i thought i'd let you know. i don't know if that's important or not.

anyway, thanks for your help! only 10 more gallery moves to go! :)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-07-17 13:27

automate that?

you could create a SQL script.

you'll have to write it once and can reuse it...

RENAME TABLE oldtablename TO newtablename;
...

 
ChrisJohnson00TA

Joined: 2004-03-15
Posts: 167
Posted: Mon, 2005-07-18 00:32

valiant: lol.. glad I could help on #5.

When I moved platforms, I had to re-create all of my resized images.. nothing worked.

I also had some issues with modules (dcraw mostly) that were ONLY resolved by deleteing my gallery2 folder, and doing a fresh gallery install with an existing DB.

My last issue was that some of my image links were 'so' broken that the only way to fix it was to delete the images, or album out of the DB, then re-create them back in G2.

 
igrcic
igrcic's picture

Joined: 2005-04-19
Posts: 78
Posted: Thu, 2006-12-14 03:14

If anyone has the script,, please upload it!!!!!! Thank you
------------------------------------------------------------------------------
...you can help, too! :)

 
igrcic
igrcic's picture

Joined: 2005-04-19
Posts: 78
Posted: Thu, 2006-12-14 03:20

oh, found it :)

http://codex.gallery2.org/index.php/Image:CaseSensitiveTables.zip

thank you!
------------------------------------------------------------------------------
...you can help, too! :)