Jump to:

4885 Posts in 7139 Topics by 1472 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Problems with silverstripe-cache when installing SS 3.0 - shared environment

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 3287 Views
  • Thomashv
    Avatar
    Community Member
    32 Posts

    Problems with silverstripe-cache when installing SS 3.0 - shared environment Link to this post

    When trying to install the Silverstripe 3.0 Beta 3, I get the "Is the temporary directory writeable?" as expected. When installing earlier versions of SS i have only created an silverstripe-cache folder in SS root. But I still get this warning after created this folder. And the warning is pointing to the /tmp/silverstripe-cache.

    Here is the full message:

    User 'ua00002' needs to be able to write to this file:
    /tmp/silverstripe-cache

    The file is currently owned by 'ua00003'. There is no user-group that contains both the web-server user and the owner of this file. Change the ownership of the file, create a new group, or temporarily make the file writeable by everyone during the install process.

    Isn't SS 3.0 Beta 3 automaticly detecting the silverstripe-cache on root? Does anyone know how to fix this?

  • Bambii7
    Avatar
    Community Member
    254 Posts

    Re: Problems with silverstripe-cache when installing SS 3.0 - shared environment Link to this post

    You could try
    chown ua00002:us00002 /tmp/silverstripe-cache

  • Thomashv
    Avatar
    Community Member
    32 Posts

    Re: Problems with silverstripe-cache when installing SS 3.0 - shared environment Link to this post

    Well.. That would be great if I could change this, but I don't have access to this folder as it is on a shared network. So i need to use the method of creating a silverstripe-cache folder in the sites root directory at the same level as mysite, cms, sapphire folder etc... That use to work with earlier versions of SS, but not in this version it seems.

  • Bambii7
    Avatar
    Community Member
    254 Posts

    Re: Problems with silverstripe-cache when installing SS 3.0 - shared environment Link to this post

    Right, you could try changing the references in sapphire/core/Core.php and install.php5
    These seem to be the only two places, not ideal but its all I can offer.

  • Thomashv
    Avatar
    Community Member
    32 Posts

    Re: Problems with silverstripe-cache when installing SS 3.0 - shared environment Link to this post

    Thanks for the tip. It seems like it is enough just to delete the variable $sysTmp from the path specification in the $ssTmp variable in framework/dev/install/install.php5. Find the getTempFolder function and replace $ssTmp = "$sysTmp/silverstripe-cache" width $ssTmp = "/silverstripe-cache". Like this:

    function getTempFolder() {
          $sysTmp = sys_get_temp_dir();
          $worked = true;
          $ssTmp = "/silverstripe-cache";

          if(!@file_exists($ssTmp)) {
             $worked = @mkdir($ssTmp);
          }

          if(!$worked) {
             $ssTmp = dirname($_SERVER['SCRIPT_FILENAME']) . '/silverstripe-cache';
             $worked = true;
             if(!@file_exists($ssTmp)) {
                $worked = @mkdir($ssTmp);
             }
          }

          if($worked) return $ssTmp;

          return false;
       }

    Of course this is not a ideal solution because it may cause problems when upgrading...

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Problems with silverstripe-cache when installing SS 3.0 - shared environment Link to this post

    Please raise this as a bug on open.silverstripe.org. If SS is no longer picking up a 'silverstripe-cache' dir then it is a regression that should be solved and documented.

  • Thomashv
    Avatar
    Community Member
    32 Posts

    Re: Problems with silverstripe-cache when installing SS 3.0 - shared environment Link to this post

    I was about to now, but I think this ticket is documenting this Willr?
    http://open.silverstripe.org/ticket/7670

  • edwardlewis
    Avatar
    Community Member
    32 Posts

    Re: Problems with silverstripe-cache when installing SS 3.0 - shared environment Link to this post

    I just had the same problem trying to install SS3 on my server. Changing the path from "$sysTmp/silverstripe-cache" to "/silverstripe-cache" fixed the issue.

    Before that it was saying the silverstripe-cache directory was owned by another account on my server.. I had created the directory on the new SS3 account, in the public_html folder and in the tmp folder - but the error was still being displayed.

    3287 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.