Page 1 of 1

shared installation: hard or symbol-link?

Posted: Mon Nov 27, 2006 8:11 pm
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()?

Re: shared installation: hard or symbol-link?

Posted: Mon Nov 27, 2006 10:54 pm
by garvinhicking
Hi!

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

Best regards,
Garvin

Posted: Mon Nov 27, 2006 11:51 pm
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.

Posted: Tue Nov 28, 2006 12:25 am
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

Posted: Tue Nov 28, 2006 12:54 am
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!