This is probably a request to explain what symlinks do and do not do. I thought from Apache and PHP's perspective they were as good as a real directory, but clearly not.

Due to space constraints on one mount we moved the cache directory and symlinked to it. The result was that neither reading nor writing boost cache files worked! Reading simply failed and writing caused an error on fopen.

benjamin, Agaric Design Collective

Comments

moshe weitzman’s picture

i think you have to turn on symlink support in apache. see http://www.webmasterworld.com/forum11/1962.htm, for example. search for followsymlinks.

post here what you find out.

mlncn’s picture

Symlinks are allowed in our Apache setup. At least the standard allow in .htaccess

# Follow symbolic links in this directory.
Options +FollowSymLinks

And in the relevant sites-enabled file:

  DocumentRoot /var/www/wsf2008
  <Directory />
    Options FollowSymlinks
    AllowOverride None
  </Directory>
  <Directory /var/www/wsf2008>
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    allow from all
  </Directory>

We can try experimenting more after WSF!

Popolo-1’s picture

Hi,

I installed Boost and did the required change in .htaccess.

Each time anonymous visitors are on the site I receive following error report (for each page):

Unable to create symlink: /mounted-storage/xxx/yyy/www.mysite.com/cache/fr.mysite.com/0/france.html to /mounted-storage/xxx/yyy/www.mysite.com/cache/fr.mysite.com/0/taxonomy/term/22.html

Hosting is LAMP.
cache directory is writable.

I do not understand what I did wrong (I have little knowledge about coding).
Does anybody have an idea on how I could fix the issue?
Thanks in advance,

mlncn’s picture

Popolo, make sure your Apache configuration (in httpd.conf or sites-enabled/) has something like my second quoted text, above.

And these directories aren't themselves symlinked are they? That was my problem.

Finally, there's a patch to boost to make it not try to symlink, which is sometimes a good idea in any case: http://drupal.org/node/174380

Popolo-1’s picture

Benjamin, thanks for your answer.
I put the patch I noticed the following:
- regarding nodes it works fine
- but when I clic on a term (tags of the node) there is an error in the watchdog "Unable to write copy of node/95".

tsavino’s picture

My apache is set right cache is chmod correct and I used your htaccess file when I look at the file properties for file workreq_howto.html I get this

-------------------------------------------------------------
location: /apps/opt/drupal/cache/usehp.verizon.com/0

sixe: 29B

Links to: /apps/opt/drupal/node/38.html
--------------------------------------------------------------

The file is really at /apps/opt/drupal/cache/usehp.verizon.com/0/node/38.html

So some where the linking is wrong

any clues?

mikeytown2’s picture

Status: Active » Closed (duplicate)

This issue removes all symlinks; merging all symlink issues into this one.
#174380: Remove symlink creation. Let each path have own file