Hello,
I asked my hosting admins to copy the g2data dir to my new server and I did the migrating process as advised in the G2 Faq. However, the problem is that the admin who copied my g2data forgot to change its owner to the web user. Therefore (I guess), when I installed gallery2, it cannot install the core module and it is stuck there.
What do you suggest me to do next? Ask the admin to set the g2data folder's owner and redo the installation or I have to delete the g2data folder/database and redo the migration again from scratch?
----
Gallery URL (optional): www.donggiang.com/photos (old), 72.29.77.48/~donght/photos/ (new)
Gallery version = 2.0-beta-2+ core 0.9.15
PHP version = 4.3.11 apache
Webserver = Apache/1.3.33 (Unix) mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.11 FrontPage/5.0.2.2634a mod_ssl/2.8.22 OpenSSL/0.9.7a
Database = mysql 4.0.22-standard
Toolkits = ImageMagick
Operating system = Linux nifty.surpasshosting.com 2.4.26-ow3 #2 SMP Tue Nov 9 00:16:56 EST 2004 i686
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Posts: 8601
you have a number of options.. pick the easiest..
- get the admin to fix the file/dir owners
- do a clean install and remigrate from G1
- write a php script to copy the g2data files (as this runs with the webserver/php user when it writes the copies it will use the correct owner) to a new g2data dir
Posts: 32509
safer to start from scratch. a halfway through core install can be in any state.
but...
if you followed the instructions, then your new and old g2 install would be on the same version. i.e. the installer steps on the new domain shouldn't do anything than writing a new config.php and flushing the cache.
Posts: 22
Thanks! I'm going to redo it from scratch.
Just a little bit curious though. Why should the g2data content be owned by the webserver user? Why can't we just set the files' permission to 666?
Posts: 32509
chown -R webserver user OR chmod -R 777, both is ok. but as soon as you start adding items / albums, the new dirs/files will be owned by the webserver user anyway. so, it's a little cleaner if the whole g2data tree is owned by the same user. but it really doesn't matter.
Posts: 22
That's strange! I actually did chmod -R 777 the whole g2data tree but the installation still failed.
This makes me a little nervous for the next migration since the issue might not be the data files' permission/owner but might be something else.
Posts: 22
I managed to migrate my gallery2 to the new server but now all my the thumnails and intermedia images are missing (the fullsize images view fine though). The installation went well without error msg.
BTW, I checked my g2data dir, the owner of the files/dirs now is nobody. Is this the webserver user?
Should I rebuild all the derrivatives?
Afraid to crash this intallation again, I want to get your advices before doing anything.
Infos:
Site: http://72.29.77.48/~donght/photos/
Gallery version = 2.0-beta-2+ core 0.9.15
PHP version = 4.3.11 apache
Webserver = Apache/1.3.33 (Unix) mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.11 FrontPage/5.0.2.2634a mod_ssl/2.8.22 OpenSSL/0.9.7a
Database = mysql 4.0.24-standard
Toolkits = ImageMagick
Operating system = Linux pass30.dizinc.com 2.4.29-ow1 #1 SMP Sat Apr 23 02:22:15 EDT 2005 i686
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Posts: 32509
- you could try to rebuild all derivatives.
- i guess 'nobody' is the webserver user, but you can verify this only by asking your webhoster or by checking for yourself with a small php script
<?php
exec('whoami', $ret);
print 'who am i?<br>';
print '<pre>';
var_dump($ret);
print '</pre>';
?>
this should print out the user under which the php script are executed.
Posts: 22
Thank you valiant!
Just ran the maintenance task Build all thumbnails/resizes, but the problem isn't resolved. I'm not sure this task rebuilds all the thumbnail though. It seems that it only checks if the derivatives are there. I also tried to go to an album's settings and rebuild all the thumbnails/resizes of that album but I still got broken thumbnails.
At this point, I don't know what to do next.
BTW, the strange thing is the images has two size options: its original full size and 92x92. Don't know where this 92x92 came in.
Posts: 22
Hang on, I think I found the problem. The ImageMagick binary cannot be found. May be it's on a differrent path on the server. Will check with the hosting admins.
But I think the installation should check if the binary exists, or at least, the build all thumbnails/resizes should report error, don't you think?
I install the GD module and the derivatives can be created now.
Posts: 32509
true, i have to add a note about exec files paths to the migration instructions.
G2 still asumes the paths you set on the old host.
doesn't it report errors when you try to generate thumbs in the new host when you still have the old paths set?
Posts: 22
It doesn't. That made me so confused the last time so that to be sure I had to recopy 5GB of my g2data again from the old server .
Anyway, I'm happy now having my gallery up and running well (from 3-day migrating effort though).
Thanks again for your help!
Posts: 22
BTW, an off-topic question, I want to modified the .htaccess file on the old server so that every request will automatically redirect to the corresponding one on the new server (I already put a www2.donggiang.com DNS record to point to the new server). Is there any way to do this?
Posts: 32509
i'm not quite sure if mod_rewrite is only for internal rewrite rules / redirections.
you could try it and if it doesn't work, you can accomplish the same with a very small php script.
edit: of course it's possible with mod_rewrite.
have a look at http://httpd.apache.org/docs/misc/rewriteguide.html and google for mod_rewrite +how.