Problems enabling symbolic link to cache

having a little problem Problems enabling symbolic link to cache. In admin it says: Correctly configured symbolic link must link C:/inetpub/wwwroot/xxx/cache/ to C:/inetpub/data\views_simplecache/. I ran this command in windows server 2016

 cmd /c mklink C:\inetpub\wwwroot\xxx\cache C:\inetpub\data\views_simplecache

The response was : symbolic link created for C:\inetpub\wwwroot\xxx\cache <<===>> C:\inetpub\data\views_simplecache

xx folder name

Response from Admin section: Due to your server configuration, symbolic link can not be established automatically please refer to your documentation and establish the link manually. Now since there is no folder named Cache in Elgg, do I need to create that folder and where do I put it thanks.

  • I have absolutely no experience with Windows servers, so I can't say if the cache symlink will even work on Windows systems. Specifically, I can't say if there might be any issue with file/link permissions (as these would have to match on Linux systems or the webserver would at least have to be proper access/read/write permissions also on the symlink).

    On checking the syntax of the mklink command (as I was wondering about the order of the link and target arguments - MS once again did it just differently...) I read about the /d parameter that might be necessary here. because views_simplecache is a directory. Try it with

    cmd /c mklink /d C:\inetpub\wwwroot\xxx\cache C:\inetpub\data\views_simplecache

    after deleting any existing cache link. Maybe it helps.

  • Ok thanks, It did create the cache.symlink in the root folder but has zero bits in it. I know about the/d switch so I will try to delete it and post back when I figure it out.

    Thanks again iionly

  • Update: /d switch does not work /c switch adds the sylink to the root. Still not able to update it in admin so I went to check the site speed. With the link created it cuts the full page load time in half.

    Thanks

  • Your last post made me wonder if you replaced the /c parameter with the /d parameter. That would be wrong for sure. The /c parameter is for the cmd command (before mklink) whereas the /d parameter would be for the mklink command (so: after mklink).

    As I said I have no experience with Windows. Maybe /d does indeed not exist for mklink (I just googled).

    I wouldn't fully trust speed measurement alone. Elgg can't create the symlink on some systems. Therefore, the suggestion displayed on the advanced settings page how to create the symlink yourself. But Elgg also checks the existence of the symlink. If it found it working, it should display a corresponding text on the settings page and the symlink checkbox is greyed out. But maybe Elgg can't even check the existence of the link on Windows. But in this case I'm not sure if it makes use of the symlink at all.

  • Thanks I will run it like this and see what happens:

    cmd /c mklink /d C:\inetpub\wwwroot\xxx\cache C:\inetpub\data\views_simplecache

  • Ok update C:\Users\Administrator>cmd /c mklink /d C:\inetpub\wwwroot\xx\cache C:\inetpub\data10\views_simplec
    symbolic link created for C:\inetpub\wwwroot\xxx\cache <<===>> C:\inetpub\data10\views_simplecache

    Ok this time it created the folder. I knew it should have a cache folder built, but didn't know if the mlink would make it or not. No need to check the box in admin, the mlink does it for you. Now we know.

    Thanks for the help iionly

    Bo