Moving Gallery images, settings and such.

supraman215

Joined: 2004-10-19
Posts: 26
Posted: Mon, 2005-11-07 19:10

I did a multi site install on my server, the imported a bunch of stuff from gallery1 and have since changed permissions and done lots of other stuff. Now I want this gallery to move to a different folder on the file system, which would make it a different url,

move from: /home/username/public_html/www.exmapleA.com/gallery
move to: /home/username/public_html/www.exmapleB.com/gallery

I'm guessing with all the settings pointing to files on the file system with fully defined paths, and all the stuff in the database this might not be possible just to move the files.

Can I do another multisite to the other URL? and somehow import the albums with the captions and permissions I want? Thanks

Jeff

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-11-08 00:10

do you want to move the codebase or the multisite?

case a: moving codebase:
- mv the codebase folder
- in your multisite, change the include path in main.php, embed.php, ...

case b: moving the multisite
- mv the multisite folder
- update config.php to set new storage directory path if it was changed
etc. (follow the instructions about moving a g2 to another folder)

FAQ: How can I move my gallery installation from one folder to another?

 
sneeper

Joined: 2005-10-24
Posts: 20
Posted: Tue, 2005-11-08 07:11

To add on to what valient said, since I just did this -- be sure to disable and uninstall the mod_rewrite module (if you are moving the multisite, not the code base). Then install and configure it again. It should now rewrite to the correct (new) path.

 
Lapinoo
Lapinoo's picture

Joined: 2004-05-08
Posts: 378
Posted: Tue, 2005-11-08 11:19
sneeper wrote:
To add on to what valient said, since I just did this -- be sure to disable and uninstall the mod_rewrite module (if you are moving the multisite, not the code base). Then install and configure it again. It should now rewrite to the correct (new) path.

Editing the paths in the .htaccess was not sufficient?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-11-08 15:22

the url rewrite must be diabled of course. that's part of the faq entry i linked.

 
supraman215

Joined: 2004-10-19
Posts: 26
Posted: Tue, 2005-11-08 19:27

Thanks for the FAQ link I shoud have checked that myself. IT is not a move of the codebase, just the multisite itself. Thanks!

 
supraman215

Joined: 2004-10-19
Posts: 26
Posted: Fri, 2005-11-11 03:23

Any ideas, I followed the directions on the FAQ to a tee.

Warning: mkdir(/home/wheels/public_html/www.example1.com/gallery2): Permission denied in /home/wheels/public_html/www.example2.org/gallery2_codebase/modules/core/classes/GalleryPlatform.class on line 622

Warning: rename(/tmp/0.incdf1W8S,/home/wheels/public_html/www.example1.com/gallery2/g2data/cache/module/core/0/0/0.inc): No such file or directory in /home/wheels/public_html/www.example2.org/gallery2_codebase/modules/core/classes/GalleryPlatform.class on line 485

Warning: mkdir(/home/wheels/public_html/www.example1.com/gallery2): Permission denied in /home/wheels/public_html/www.example2.org/gallery2_codebase/modules/core/classes/GalleryPlatform.class on line 622

Warning: rename(/tmp/0.incxgB6Xt,/home/wheels/public_html/www.example1.com/gallery2/g2data/cache/module/core/0/0/0.inc): No such file or directory in /home/wheels/public_html/www.example2.org/gallery2_codebase/modules/core/classes/GalleryPlatform.class on line 485

Warning: mkdir(/home/wheels/public_html/www.example1.com/gallery2): Permission denied in /home/wheels/public_html/www.example2.org/gallery2_codebase/modules/core/classes/GalleryPlatform.class on line 622

Warning: rename(/tmp/GalleryFactoryHelper_loadRegistry.inchFw0Mg,/home/wheels/public_html/www.example1.com/gallery2/g2data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc): No such file or directory in /home/wheels/public_html/www.example2.org/gallery2_codebase/modules/core/classes/GalleryPlatform.class on line 485

Warning: Cannot modify header information - headers already sent by (output started at /home/wheels/public_html/www.example2.org/gallery2_codebase/modules/core/classes/GalleryPlatform.class:622) in /home/wheels/public_html/www.example2.org/gallery2_codebase/modules/core/classes/GalleryPhpVm.class on line 124

Warning: rename(/tmp/c32e3d9bb75c2be5b959998f452c1957305Z79,/home/wheels/public_html/www.example1.com/gallery2/g2data/sessions/c32e3d9bb75c2be5b959998f452c1957): No such file or directory in /home/wheels/public_html/www.example2.org/gallery2_codebase/modules/core/classes/GalleryPlatform.class on line 485

 
supraman215

Joined: 2004-10-19
Posts: 26
Posted: Fri, 2005-11-11 03:25

btw I used cp not mv, just to test. I also checked the permissions on the folders and they do seem to be the same.

 
supraman215

Joined: 2004-10-19
Posts: 26
Posted: Fri, 2005-11-11 03:35

Ok solved that problem. Bad URL. Now I get this.

Error (ERROR_PLATFORM_FAILURE) :

* in modules/core/classes/GalleryTemplate.class at line 270 (gallerystatus::error)
* in modules/core/classes/GalleryTemplate.class at line 222 (gallerytemplate::_initcompiledtemplatedir)
* in main.php at line 318 (gallerytemplate::display)
* in main.php at line 87
* in main.php at line 80
* in /home/wheels/public_html/www.example1.com/gallery/main.php at line 3

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-11-11 08:19

cp doesn't copy the permissions by default.
run chmod -R or chown -R such that the webserver user has write permissions again.

use the debug mode for further details..

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

 
supraman215

Joined: 2004-10-19
Posts: 26
Posted: Sat, 2005-11-12 15:27

ok I copied it with -R. Why did I get the above mentioned error?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-11-12 16:02

cp doesn't copy the permissions (if you don't specify the correct cp parameter)

 
supraman215

Joined: 2004-10-19
Posts: 26
Posted: Sat, 2005-11-12 17:06

yeah after I copied it with just cp I deleted it then I went with cp -R but it still gives me that error

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-11-12 17:25

i said:
chmod -R , or chown -R ,
i didn't say: cp -R.
cp -R only copies a directory recursively with all its subdirectories and files.

see: http://www.hmug.org/man/1/cp.php "-p" preserves permissions (maybe it's different on other platforms).

moving this topic to the support forums.

 
supraman215

Joined: 2004-10-19
Posts: 26
Posted: Sat, 2005-11-12 20:05

sorry I see what you're saying now but I've confirmed that all the folders and files retained their permissions from the original. I created the originals with the same user as i made the copy with.

 
Lapinoo
Lapinoo's picture

Joined: 2004-05-08
Posts: 378
Posted: Sat, 2005-11-12 20:25

Do you use SELinux by any chance?

 
supraman215

Joined: 2004-10-19
Posts: 26
Posted: Sat, 2005-11-12 23:20

nah it's debbian

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-11-12 23:44

SELinux isn't only a distribution, it's also used in other distributions. but i haven't heard of a debian with selinux yet.

 
Lapinoo
Lapinoo's picture

Joined: 2004-05-08
Posts: 378
Posted: Sun, 2005-11-13 11:55

I just checked, there is a SELinux package for unstable Debian.

Can you check if it is enabled :

[user@machine]~% selinuxenabled 
[user@machine]~% echo $?
0

if it returns 0, then SELinux is enabled, if it return 255, then it's not.

 
supraman215

Joined: 2004-10-19
Posts: 26
Posted: Sun, 2005-11-13 18:02

figured it out. Thanks guys.