shared installation: hard or symbol-link?

Having trouble installing serendipity?
Post Reply
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

shared installation: hard or symbol-link?

Post by stm999999999 »

Hello,

on http://www.s9y.org/41.html is written:

Code: Select all

$ ln -s -d /usr/local/lib/php/s9y/templates /home/www/garvin.s9yblogs.org/htdocs/templates
manpage says:

Code: Select all

-d, -F, --directory 
Allow the super-user to make hard links to directories. 
-s, --symbolic 
Make symbolic links instead of hard links.
-s or -d? hard ord symbolic links?

So, doing this on a remote server with php-script:

symlink() or link()?
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: shared installation: hard or symbol-link?

Post by garvinhicking »

Hi!

I always use "-s -d" and it works. :)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

ok, I take symlink(), ont the first sight, it works. But on the second ... :-(

I make a dir "joseph" parallel to "s9y". I copy alls deplyoment-files. I make a symbol-link for templates and htmlarea.

I get most of teh template to display, but not the template-images.

When I try to look at one of the images directly, i get:

Code: Select all

You don't have permission to access /templates/joseph01/img/right_header-kirche4.png on this server.
This is my joseph-dir:

Code: Select all

lrwxrwxrwx    1 30       8              16 Nov 27 23:23 templates -> ../s9y/templates
drwxrwxrwx    2 717      717          4096 Nov 27 23:22 templates_c
Is there anything wrong?

FYI: my s9y-dir:

Code: Select all

drwxrwxrwx   36 717      717          4096 Nov 26 17:28 templates
drwxrwxrwx    2 717      717          8192 Nov 27 00:33 templates_c
BTW, the same error occurs for the preview-images in the style-selector, but of course only for the local themes like

http://joseph.hweb24test.ok-webhost08.d ... review.png

the nettmirror-images are fine.

And I have a second installation like joseph (=no core-files, only deployment), but I make a copy of templates, no link; this works fine.
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

A permission denied often means that your webserver does not FollowSymlinks in some cases?

I never used PHP symlink, I always only use Linux-Bash/SSH symlink creation.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

great answer!

"Options +FollowSymLinks" in the .htaccess helps very much!

BTW, I found out, that the both link/copy-statements are not enough:

things like

http://host.example/plugins/serendipity ... icpage.png
(the edit_staticpage-image for the wikilinks)

or

<script type="text/javascript">var lightbox_path = "/plugins/serendipity_event_lightbox/lightbox_plus";</script>

do not work on shared installations!

There must be a link to /plugins, too!
Ciao, Stephan
Post Reply