Moving G2.3 to a new host - HELP!

picdude

Joined: 2006-06-13
Posts: 145
Posted: Fri, 2011-05-27 19:18

Gallery URL = http://www.photosbybailini.com/g2/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.17 cgi
Webserver = Apache/2
Database = mysqlt 5.0.91-log, lock.system=flock
Toolkits = ImageMagick, jpegtran
Acceleration = partial/3600, partial/3600
Operating system = Linux cgi0704.int.bizland.net 2.6.35.8-nx #1 SMP Wed Nov 3 01:47:21 EDT 2010 i686
Default theme = carbon
gettext = enabled
Locale = en_GB
Browser = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1

NOTE: the above gallery link points to my old host since the new one isn't working yet.

I'm in a pickle of problem....

The backup of my old host g2 was done before I realized that the mod_rewrite was active (I had some customization work done in paid support that must have turned it on... I didn't know!). Can I simply go into the modules directory on the new host and delete the rewrite module?

Also, I'm unclear on the procedure. Can I just unpack my g2 backup on the new host or do I have to do a fresh install of g2 first, then unpack my backup overtop of that?

I've been struggling with this for days now, so please, please help!

Thanks

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7890
Posted: Fri, 2011-05-27 21:08
 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Fri, 2011-05-27 21:58

Thanks suprsidr. Now I just need to get the database I backed up to import.... not as easy as it sounds, apparently.
Should I still delete the rewrite module from the modules directory, or will clearing if from the database be sufficient?

So, I've re-re-reread the move instructions. I'm guessing I have to do a fresh install then upload the old installation one directory at a time over top of it (with the noted exceptions)..?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7890
Posted: Fri, 2011-05-27 22:18

from that faq, execute the sql in your DB manager(phpMyAdmin) and also renaming your gallery2/.htaccess to anything different will help.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Sat, 2011-05-28 21:45

I'm having the webhost tech support import the db for me since I keep getting errors with the .gz version and the full version is larger than the 50Mb myPhpAdmin limit. Hopefully, they'll get it done right and then I'll execute the sql. Thanks again!

Having re-re-re-re-read the instructions (yes, this is beyond greek for me), I see one very unfortunate possible scenario. A while back I had Andy Liebeman (going by memory, sorry for the spelling) do some customization for me. He altered the way the pages are displayed so that they come up as flash objects (to help prevent theft of my proofs). With the migration, I'm guessing I'll loose that very valuable feature.

Is there a way I could contact Andy Liebeman to ask about maintaining the customization after migration?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7890
Posted: Sun, 2011-05-29 03:01
Quote:
I'm guessing I'll loose that very valuable feature.

if you're copying the same codebase, the templates will be the same.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Sun, 2011-05-29 14:23

I thought the g2data folder was the only thing copied from the old directory (and the database, of course).
Is the codebase within g2data or should I be copying some other files as well? Could you tell me which files I should bring over from the old host?

Thanks

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7890
Posted: Sun, 2011-05-29 14:40

if you have customized anything ie. themes, module... you need to copy gallery's codebase as well. That would be the whole yoursite.com/gallery2 directory
g2data is the storage directory.

BTW there is no reason your DB should be 50MB, unless you have millions of photos.
there is likely some tables with unnecessary data like g2_FailedLoginsMap, g2_ImageBlockCacheMap, and g2_SessionMap.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Sun, 2011-05-29 15:04

Ahh... ok, so if I copy the whole g2 directory, I'd have to go into config.php and change the g2data file path and the database info manually, as per step 9 in the faq, right? Would I then NOT have to install a fresh version of g2 (step 7 in the faq)?

I do have a lot of photos, but not millions. I have about 85,000. My DB is about 100Mb. Can I delete those tables you mentioned manually?

Thanks again.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7890
Posted: Sun, 2011-05-29 15:28
Quote:
Would I then NOT have to install a fresh version of g2 (step 7 in the faq)?

not if you have all the pieces from your old gallery, just change the DB info and g2data path.

Quote:
Can I delete those tables you mentioned manually?

Not the tables, but the data within them.
If your DB has been fully restored already use gallery's maintenance utilities to clear data when you have it functioning again.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Mon, 2011-05-30 15:03

Strange thing with the database.... the original export from the old host is 95.96 Mb. The import onto the new host is 76.29 Mb.
This is the second attempt at importing the db because I thought the first try left pieces behind (due to the size difference), but this one imported as the exact same size as the first try.
Thoughts?

As for the db itself, I regularly delete session info, but I'm not sure where to delete the ImageBlockCacheMap. I admit that I've never tried clearing the failed login attempts. I regularly clear the db cache from both the admin/maintenance and lib/support.
Does the size still seem too big?

Thanks again, suprsidr.
This info is invaluable!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7890
Posted: Mon, 2011-05-30 15:41

you can go into phpMyAdmin and empty(not drop) ImageBlockCacheMap
also from phpMyAdmin you can easily see the size of each table

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Mon, 2011-05-30 16:11

I've deactivated the rewrite module from within the database.
Just have to get the installation working before I can test it.... I'll wait till it's working before emptying (NOT dropping) the ImageBlockCacheMap.

Any thoughts on the size discrepancy between export and import?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7890
Posted: Mon, 2011-05-30 16:51
Quote:
Any thoughts on the size discrepancy between export and import?

different operating systems report different sizes.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Mon, 2011-05-30 20:23

No kidding, eh?
And I thought a database was a database was a database.... who'd've thunk it.

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Tue, 2011-05-31 18:32

Ok....
I've changed the g2data path and db info in config.php
I've renamed the g2 .htaccess file
I've disabled the mod_rewrite from within the db.

Is there a way to test the gallery function before changing the nameserver?

much obliged.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7890
Posted: Tue, 2011-05-31 19:10

depends on your host.
sometimes it resolves to an IP, sometimes you can view through your control panel software, sometimes you need to wait for DNS propagation.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Tue, 2011-05-31 20:14

Looks like the installation is working!
That is, all except the flash modification that I was trying so hard to maintain.....

I'm pretty sure that the mod_rewrite was part of the customization that Andy performed.
Now that it's on the new server, do you think re-activating that plug-in will get it to work again?
If not, do you have any other ideas that may get it working...?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7890
Posted: Tue, 2011-05-31 20:40

you can certainly try re-enabling the module and re-naming .htaccess back to .htaccess as his rewrites would be contained within.

I have a flash mod as well.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Tue, 2011-05-31 20:51

Keep that flash mod handy, suprsidr....

I'm pretty sure the mod_rewrite is working, but it's still not displaying the proofs as flash (it's not displaying the proofs at all, for that matter). The photo page loads, but the frame is empty. When I right click on it, I get the "About Adobe flash player...." but it also says "Movie not loaded" Movie??

Could this be because I'm working from the temp url instead of my domain?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7890
Posted: Tue, 2011-05-31 21:07
 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Tue, 2011-05-31 21:15

Still familiarizing myself with the new control panel, but I don't think so.

Here are the latest errors from the log, but I think they pertain to my configuring the rewrite plugin.

[Tue May 31 16:41:37 2011] [error] [client 70.27.136.30] File does not exist: /home/photosby/public_html/g2/modules/rewrite/data/mod_rewrite_no_options/custom/sys_cpanel, referer: http://208.116.44.154/~photosby/g2/modules/rewrite/data/mod_rewrite_no_options/custom/Rewrite.txt
[Tue May 31 16:41:33 2011] [error] [client 70.27.136.30] File does not exist: /home/photosby/public_html/g2/modules/rewrite/data/mod_rewrite/custom/sys_cpanel, referer: http://208.116.44.154/~photosby/g2/modules/rewrite/data/mod_rewrite/custom/Rewrite.txt
[Tue May 31 16:38:22 2011] [error] [client 70.27.136.30] File does not exist: /home/photosby/public_html/g2/modules/rewrite/data/mod_rewrite_no_options/custom/sys_cpanel, referer: http://208.116.44.154/~photosby/g2/modules/rewrite/data/mod_rewrite_no_options/custom/Rewrite.txt
[Tue May 31 16:38:16 2011] [error] [client 70.27.136.30] File does not exist: /home/photosby/public_html/g2/modules/rewrite/data/mod_rewrite/custom/sys_cpanel, referer: http://208.116.44.154/~photosby/g2/modules/rewrite/data/mod_rewrite/custom/Rewrite.txt
[Tue May 31 16:30:30 2011] [error] [client 70.27.136.30] File does not exist: /home/photosby/public_html/g2/modules/rewrite/data/mod_rewrite/custom/sys_cpanel, referer: http://208.116.44.154/~photosby/g2/modules/rewrite/data/mod_rewrite/custom/Rewrite.txt

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7890
Posted: Tue, 2011-05-31 21:22

looks like Andy was urlencoding the src and having either rewrite or the flash display decoding.
but after decoding I'll tell you the url is formed like: /g2/d/214258-1/....
so your new moved gallery should also be yoursite.com/g2/

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7890
Posted: Tue, 2011-05-31 21:29

its also looking for the flash swf in /g2/themes/carbon/swfir.swf
that's why the movie is not loaded.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Tue, 2011-05-31 21:38

I believe the path is still correct. I've named the new directory g2 just for that reason.
Although, now it's home/user/public_html/g2
Does it require the absolute path, because that would naturally have changed. But the directory itself is the same.

The file swfir.swf is in the carbon theme. I just checked.

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Tue, 2011-05-31 21:45

Would it help seeing the web result?

http://208.116.44.154/~photosby/g2/v/Equine/Equine2011/2011_GlenOroCT_May1/Candids/010511-C002.jpg.html

As I said, I'm running off the temp url until the nameserver is changed over.
Once that happens it will read photosbybailini.com/g2/v/etc.....

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7890
Posted: Tue, 2011-05-31 21:45

as long as your new gallery resolves to yoursite.com/g2 I think it should work.

same domain?

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Tue, 2011-05-31 21:47

I have to head out for a while...
Will check back tomorrow for your invaluable input.

Thanks

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7890
Posted: Tue, 2011-05-31 21:51
 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Wed, 2011-06-01 14:53

I think I understand.

So, even though I configured the mod_rewrite .htaccess files to use /~photosby/g2/, the flash still need the domain url (ie. photosbybailini.com/g2/)
Does this mean that once I switch over the nameservers, it should work?

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Thu, 2011-06-02 00:06

Hey suprsidr..... check it out!!! This is fresh off the new host server.

http://www.photosbybailini.com/~photosby/g2/v/Equine/Equine2011/2011_GlenOroCT_May1/Prelim/Open/010511-9049.jpg.html

I admit that I don't really know why it's working since the url is different than it was on the old host ( the /~photosby/ part), but I guess I shouldn't look a gift horse in the mouth.... 'scuse the pun.

Now, any chance you could help me get GR working....?
nivekiam was helping me out on this thread http://gallery.menalto.com/node/101913 but I haven't heard from him in a while...

I've installed your uploadify module and I like it better than the upload applet, but I really need to streamline large volume album creation & uploading and GR is the best way to do it.

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Thu, 2011-06-02 00:37

I may have spoken too soon.......

It seems that the domain followed by /~photosby/ will work, but just the domain followed by /g2/ not so much.

My head's swimming with .htaccess files and paths....
Is this a server config issue or is the flash mod just not pointing in the right direction?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7890
Posted: Thu, 2011-06-02 00:41

Glad you got it working

Quote:
Now, any chance you could help me get GR working....?

Have not touched it in eons, cannot stomach java.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Thu, 2011-06-02 01:00

It was a short lived victory......

these file paths are driving me nuts.

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Thu, 2011-06-02 01:47

Ok.... I think (THINK!) I have the flash mod working now.
Could I impose on you for one more piece of insight...?

Now that the DNS has switched over to my new host, if someone were to browse to my domain www.photosbybailini.com they get to see the root directory of my server. NOT GOOD!!

I can't figure out how to get it to point automatically to /g2
Maybe I'm over thinking this..... is there a simple solution that you know of?

I know this isn't within your jurisdiction, but I'm pretty desperate right now and any input is great appreciated.

 
picdude

Joined: 2006-06-13
Posts: 145
Posted: Thu, 2011-06-02 02:02

Sorry again....
A simple url redirect seems to have solved that catastrophe. D'Oh!!
Still getting used to the new VPS cPanel.