Announcement

#1 2013-09-26 01:09:19

piwiLaborer
Member
2013-07-30
33

[resolved] make symlink to galleries work

I copied galleries tree to another drive due to space considerations, renamed the old galleries and added a symlink to the new location.

After adding a few pictures and ran tools -> synchronize, the new set showed as an album.
However, the pictures are not shown and serverlog shows a 404:

"GET /pics/i.php?/galleries/DEFECTS/SmartLapTops/IMG_6266-th.JPG&ajaxload=true HTTP/1.1" 404


A html test file symlinked in the same manner works fine. Pictures in albums loaded before the changeover are loading fine.

Any suggestions how to approach this are appreciated.
Tnx

Offline

 

#2 2013-09-26 09:11:33

flop25
Piwigo Team
2006-07-06
7037

Re: [resolved] make symlink to galleries work

Hello
Could you tell us more about your symlink and what's wrong with the path


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2013-09-26 14:59:32

piwiLaborer
Member
2013-07-30
33

Re: [resolved] make symlink to galleries work

I don't know what the cause is and I can't see anything wrong with the path.

Two cases - DEFECTS has been created after galleries have been moved, accessed via symlink and shows the problem.
             - NorthFace has been created before the move and is functional.

Permissions look identical to me.

This is the link where the galleries have been moved to:

lrwxrwxrwx  1 samartha users    46 Sep 25 12:52 galleries -> /mnt/c1d0p1/www/samartha/htdocs/pics/galleries

# l -a /mnt/c1d0p1/www/samartha/htdocs/pics/galleries/
drwxr-xr-x 7 samartha users 4096 Sep 25 12:55 .
drwxr-xr-x 3 samartha users 4096 Sep 25 12:35 ..
drwxr-xr-x 3 samartha users 4096 Sep 25 13:06 DEFECTS
drwxr-xr-x 3 samartha users 4096 Sep 18 09:51 NorthFace

DEFECTS showing the problem:

# l -aR /mnt/c1d0p1/www/samartha/htdocs/pics/galleries/DEFECTS/
/mnt/c1d0p1/www/samartha/htdocs/pics/galleries/DEFECTS/:
total 12
drwxr-xr-x 3 samartha users 4096 Sep 25 13:06 .
drwxr-xr-x 7 samartha users 4096 Sep 25 12:55 ..
drwxr-xr-x 2 samartha users 4096 Sep 25 13:18 SmartLapTopParts

/mnt/c1d0p1/www/samartha/htdocs/pics/galleries/DEFECTS/SmartLapTopParts:
total 7436
drwxr-xr-x 2 samartha users    4096 Sep 25 13:18 .
drwxr-xr-x 3 samartha users    4096 Sep 25 13:06 ..
-rw-r--r-- 1 samartha users 1723333 Sep 24 18:07 IMG_6265.JPG
-rw-r--r-- 1 samartha users 1640959 Sep 24 18:08 IMG_6266.JPG
-rw-r--r-- 1 samartha users 2299198 Sep 24 18:08 IMG_6267.JPG
-rw-r--r-- 1 samartha users 1934413 Sep 24 18:10 IMG_6268.JPG

NorthFace is OK:

# l -aR /mnt/c1d0p1/www/samartha/htdocs/pics/galleries/NorthFace/
/mnt/c1d0p1/www/samartha/htdocs/pics/galleries/NorthFace/:
total 12
drwxr-xr-x 3 samartha users 4096 Sep 18 09:51 .
drwxr-xr-x 7 samartha users 4096 Sep 25 12:55 ..
drwxr-xr-x 2 samartha users 4096 Sep 18 09:51 130917-WReturn

/mnt/c1d0p1/www/samartha/htdocs/pics/galleries/NorthFace/130917-WReturn:
total 8096
drwxr-xr-x 2 samartha users    4096 Sep 18 09:51 .
drwxr-xr-x 3 samartha users    4096 Sep 18 09:51 ..
-rw-r--r-- 1 samartha users  292290 Sep 18 09:44 130917-TentReturned2.jpg
-rw-r--r-- 1 samartha users 2319483 Jul 28 08:20 IMG_5769.JPG
-rw-r--r-- 1 samartha users 1485610 Sep 18 08:52 IMG_5770-commented.JPG
-rw-r--r-- 1 samartha users 1318694 Sep 18 08:56 IMG_5771-commented.JPG
-rw-r--r-- 1 samartha users 1674360 Sep 18 09:09 IMG_5772-commented.JPG
-rw-r--r-- 1 samartha users 1183222 Sep 18 09:15 IMG_5773-commented.JPG

Web Server log accessing DEFECTS, getting 404 error:

192.168.0.35 - - [26/Sep/2013:06:12:17 -0600] "GET /pics/admin.php?page=batch_manager&cat=recent HTTP/1.1" 200 13096 "http://samartha.net/pics/admin.php?page=cat_list" ...
192.168.0.35 - - [26/Sep/2013:06:12:17 -0600] "GET /pics/_data/combined/fgf1ug.css HTTP/1.1" 304 157 "http://samartha.net/pics/admin.php?page=batch_manager&cat=recent" ...
192.168.0.35 - - [26/Sep/2013:06:12:17 -0600] "GET /pics/i.php?/galleries/DEFECTS/SmartLapTops/IMG_6265-th.JPG HTTP/1.1" 404 258 "http://samartha.net/pics/admin.php?page=batch_manager&cat=recent" ...

Web Server log accessing NorthFace, getting 200 OK:

192.168.0.35 - - [26/Sep/2013:06:16:01 -0600] "GET /pics/plugins/admin_multi_view/controller.php HTTP/1.1" 200 2445 "http://samartha.net/pics/index.php?/category/74" ...
192.168.0.35 - - [26/Sep/2013:06:16:14 -0600] "GET /pics/index.php?/category/75 HTTP/1.1" 200 5640 "http://samartha.net/pics/index.php?/category/74"  ...
192.168.0.35 - - [26/Sep/2013:06:16:14 -0600] "GET /pics/_data/i/galleries/NorthFace/130917-WReturn/130917-TentReturned2-th.jpg HTTP/1.1" 200 4700 "http://samartha.net/pics/index.php?/category/75" ...

Offline

 

#4 2013-09-26 16:52:58

piwiLaborer
Member
2013-07-30
33

Re: [resolved] make symlink to galleries work

In addition, to get more info on potential php issues, I changed in /etc/php5/apache2/php.ini:


< ;error_log = php_errors.log
---
> error_log = /var/log/php.errors

# apache2ctl restart

but, after accessing the new album showing the problem:

l /var/log/*php*
/bin/ls: cannot access /var/log/*php*: No such file or directory

- inconclusive

Offline

 

#5 2013-09-26 17:21:31

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13786

Re: [resolved] make symlink to galleries work

Hi piwiLaborer,

piwiLaborer wrote:

192.168.0.35 - - [26/Sep/2013:06:12:17 -0600] "GET /pics/i.php?/galleries/DEFECTS/SmartLapTops/IMG_6265-th.JPG HTTP/1.1" 404 258 ...

It means that i.php gets a 404, not your JPG file. Did you touch/modify i.php in any way?

(using a symlink like you do is a perfectly right way to do things, maybe if it doesn't work on "galleries" you could try on a subdirectory only)

Offline

 

#6 2013-09-26 17:30:07

piwiLaborer
Member
2013-07-30
33

Re: [resolved] make symlink to galleries work

Haven't touched i.php at all. Will move galleries back and try a sub-dir only, thanx.

Offline

 

#7 2013-09-26 18:20:40

piwiLaborer
Member
2013-07-30
33

Re: [resolved] make symlink to galleries work

moved old gallery (without DEFECTS album) back and added symlink to album:

lrwxrwxrwx 1 samartha users   55 Sep 26 09:40 DEFECTS -> /mnt/c1d0p1/www/samartha/htdocs/pics/galleries/DEFECTS/

htdocs/pics/galleries# l DEFECTS/*
total 7428
-rw-r--r-- 1 samartha users 1723333 Sep 24 18:07 IMG_6265.JPG
-rw-r--r-- 1 samartha users 1640959 Sep 24 18:08 IMG_6266.JPG
-rw-r--r-- 1 samartha users 2299198 Sep 24 18:08 IMG_6267.JPG
-rw-r--r-- 1 samartha users 1934413 Sep 24 18:10 IMG_6268.JPG

Result after sync - album present, no pics in album.

..
mv DEFECTS link away, resync again - album deleted
mv DEFECTS link back, resync again, 4 pics added, album not shown to be added in log
..
test again, pics now there and visible over symlink on album under galleries (not symlinked)

Will play some more, would be great to have whole galleries tree symlinked rather than all albums symlinked separately

Offline

 

#8 2013-09-26 20:35:05

piwiLaborer
Member
2013-07-30
33

Re: [resolved] make symlink to galleries work

Well, put galleries back as symlink, same as before, added new album with pics in the same manner as before and ....  no more problem! Pics show fine.

Glad it works now but.... sure beats me.  Next I'll try the _data tree which apparently can get big as well.
Thanx for listening and responding.

Offline

 

#9 2013-09-26 21:32:34

flop25
Piwigo Team
2006-07-06
7037

Re: [resolved] make symlink to galleries work

Glad to see it works!
maybe linux badly mapped the symlink or the server gets lost ... ^^


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact