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
Posts: 32509
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?
Posts: 20
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.
Posts: 378
Editing the paths in the .htaccess was not sufficient?
Posts: 32509
the url rewrite must be diabled of course. that's part of the faq entry i linked.
Posts: 26
Thanks for the FAQ link I shoud have checked that myself. IT is not a move of the codebase, just the multisite itself. Thanks!
Posts: 26
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
Posts: 26
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.
Posts: 26
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
Posts: 32509
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?
Posts: 26
ok I copied it with -R. Why did I get the above mentioned error?
Posts: 32509
cp doesn't copy the permissions (if you don't specify the correct cp parameter)
Posts: 26
yeah after I copied it with just cp I deleted it then I went with cp -R but it still gives me that error
Posts: 32509
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.
Posts: 26
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.
Posts: 378
Do you use SELinux by any chance?
Posts: 26
nah it's debbian
Posts: 32509
SELinux isn't only a distribution, it's also used in other distributions. but i haven't heard of a debian with selinux yet.
Posts: 378
I just checked, there is a SELinux package for unstable Debian.
Can you check if it is enabled :
if it returns 0, then SELinux is enabled, if it return 255, then it's not.
Posts: 26
figured it out. Thanks guys.