No photos after migration to a new server

bognerart
bognerart's picture

Joined: 2007-05-05
Posts: 76
Posted: Fri, 2011-12-16 14:27

I migrated the gallery (2.3) of a friend to a new server. Text is fine, but no images are shown. There are also no images in a fresh imported album too.

I think it could be a password, but probably a file-permission problem.

What I did:
I modified in config.php:

$storeConfig['password'] = '...';
$gallery->setConfig('baseUri', 'http://galeria.dummy.tld/main.php');

I can login as adminiatrator
I cleared the cache in "maintainance"

ls -la g2data/
insgesamt 1116
drwxr-x--- 9 www-data www-data 4096 2011-12-16 14:04 .
drwxr-x--- 3 www-data www-data 4096 2011-12-16 14:04 ..
drwxr-x--- 11 www-data www-data 4096 2011-12-16 14:04 albums
drwxr-x--- 7 www-data www-data 4096 2011-12-16 14:52 cache

ls -l g2data/albums/andere_arbeiten/kommentar_i.jpg
-rw-r----- 1 www-data www-data 731071 2011-12-16 14:04 g2data/albums/andere_arbeiten/kommentar_i.jpg

I have root-access via ssh to the server.

Gallery URL = http://galeria.dummy.tld/main.php
Gallery-Version = 2.3 Kern 1.3.0
API = Core 7.54, Modul 3.9, Motiv 2.6, Eingebettet 1.5
PHP-Version = 5.3.2-1ubuntu4.10 apache2handler
Webserver = Apache/2.2.14 (Ubuntu)
Datenbank = mysqli 5.1.41-3ubuntu12.10, lock.system=flock
Werkzeuge = LinkItemToolkit, Gd, ImageMagick
Beschleunigung = none, none
Betriebssystem = Linux vps62 2.6.32 #1 SMP Mon May 9 13:27:11 CEST 2011 i686
Standard-Motiv = matrix
gettext = Aktiviert
Sprache = de_DE
Browser = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.2 (KHTML, like Gecko) Ubuntu/11.10 Chromium/15.0.874.106 Chrome/15.0.874.106 Safari/535.2
Zeilen in der GalleryAccessMap Tabelle = 6
Zeilen in der GalleryAccessSubscriberMap Tabelle = 330
Zeilen in der GalleryUser Tabelle = 2
Zeilen in der GalleryItem Tabelle = 330
Zeilen in der GalleryAlbumItem Tabelle = 12
Zeilen in der GalleryCacheMap Tabelle = 0

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2011-12-16 15:27

the entire g2data needs to be writable recursively
chmod -R 0777 /path/to/g2data

also in config.php
try $gallery->setConfig('baseUri', '='); and let gallery guess
also did you edit data.gallery.base? should end in a slash

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

 
bognerart
bognerart's picture

Joined: 2007-05-05
Posts: 76
Posted: Fri, 2011-12-16 16:33

Hi,

I did "chmod -R 0777 /path/to/g2data", although my reduced permissions above should be ok. The files belong to the webserver and the webserver can write. (drwxr-x--- 9 www-data www-data) and these permissions worked at the times, when I used gallery 2, and it works with my gallery 3

Now:
ls -l g2data/
insgesamt 1104
drwxrwxrwx 11 www-data www-data 4096 2011-12-16 14:04 albums
drwxrwxrwx 7 www-data www-data 4096 2011-12-16 14:52 cache

I didn't edit data.gallery.base and it ends with a slash. The location is the same as on the old server.

I changed to "$gallery->setConfig('baseUri', '=');" and now I see:

Fehler: 404 - Datei nicht gefunden (error 404, file not found)
http://galeria.dummy.tld/=

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2011-12-16 16:48
 
bognerart
bognerart's picture

Joined: 2007-05-05
Posts: 76
Posted: Fri, 2011-12-16 17:20

.htaccess is the same as on the old server

Quote:
cat .htaccess
# BEGIN Url Rewrite section
# (Automatically generated. Do not edit this section)
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . - [L]

RewriteCond %{QUERY_STRING} view=core.DownloadItem
RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://galeria.walkala.eu/ [NC]
RewriteCond %{HTTP:Referer} !^$
RewriteRule . /main.php [F,L]
RewriteCond %{QUERY_STRING} g2_view=core.DownloadItem
RewriteCond %{QUERY_STRING} g2_itemId=([0-9]+)
RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9\+\.\-]+://galeria.walkala.eu/ [NC]
RewriteCond %{HTTP:Referer} !^$
RewriteRule . /main.php?g2_view=rewrite.DownloadItem&g2_itemId=%1 [L]
RewriteCond %{THE_REQUEST} /sitemap(\?.|\ .)
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . /main.php?g2_view=sitemap.Sitemap [QSA,L]
RewriteCond %{THE_REQUEST} /popular(\?.|\ .)
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . /main.php?g2_view=dynamicalbum.PopularAlbum [QSA,L]
RewriteCond %{THE_REQUEST} /updates(\?.|\ .)
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . /main.php?g2_view=dynamicalbum.UpdatesAlbum [QSA,L]
RewriteCond %{THE_REQUEST} /admin/(\?.|\ .)
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . /main.php?g2_view=core.SiteAdmin [QSA,L]
RewriteCond %{THE_REQUEST} /random(\?.|\ .)
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . /main.php?g2_view=dynamicalbum.RandomAlbum [QSA,L]
RewriteCond %{THE_REQUEST} /v/([^?]+)/slideshowapplet\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . /main.php?g2_view=slideshowapplet.SlideshowApplet&g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /d/([0-9]+)-([0-9]+)/([^/?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . /main.php?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2&g2_fileName=%3 [QSA,L]
RewriteCond %{THE_REQUEST} /rss/([^\/\?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . /main.php?g2_view=rss.Render&g2_name=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /srss/([0-9]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . /main.php?g2_view=rss.SimpleRender&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /key/([^?/]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . /main.php?g2_view=keyalbum.KeywordAlbum&g2_keyword=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /f/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . /main.php?g2_controller=permalinks.Redirect&g2_filename=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /v/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . /main.php?g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . /main.php?g2_view=rewrite.FileNotFound [QSA,L]
</IfModule>

# END Url Rewrite section

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Fri, 2011-12-16 17:34

Everything on your site, nude paintings and all :), is displaying perfectly fine when I browse the site.

--
dakanji.com

 
bognerart
bognerart's picture

Joined: 2007-05-05
Posts: 76
Posted: Fri, 2011-12-16 18:36

Really?
Oh I see, there is a URL in the htaccess-file, and I was _not_ talking of this URL above, but the new URL has the same content ;-). I had to modify the .htaccess-file with the new URL. My reduced file permissions work.

So now I have to check for security updates.

Thanks a lot!

 
bognerart
bognerart's picture

Joined: 2007-05-05
Posts: 76
Posted: Fri, 2011-12-16 20:15

I think the gallery is secure now, so I can post the URL: http://galeria.walkala.priv.at/ But there is a problem with editing the Spanish language: See http://gallery.menalto.com/node/104586

 
bognerart
bognerart's picture

Joined: 2007-05-05
Posts: 76
Posted: Fri, 2011-12-16 20:17

Sorry, for this post, I have no idea how to delete it.

__

Gallery 3.0.2 Coollanta - PHP 5.3.2 - Apache2 2.2.14 - Mysql 5.1.41 - Linux kernel 2.6.32
Gallery: bognerart.eu