Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Installing SilverStripe /

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

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

Problems with silverstripe-cache when installing SS 3.0 - shared environment


Go to End
Reply


12 Posts   3994 Views

Avatar
Thomashv

Community Member, 33 Posts

13 June 2012 at 11:16am

Edited: 13/06/2012 11:18am

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?

Avatar
Bambii7

Community Member, 254 Posts

13 June 2012 at 1:17pm

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

Avatar
Thomashv

Community Member, 33 Posts

13 June 2012 at 6:38pm

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.

Avatar
Bambii7

Community Member, 254 Posts

19 June 2012 at 5:59pm

Edited: 19/06/2012 5:59pm

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.

Avatar
Thomashv

Community Member, 33 Posts

1 July 2012 at 1:18am

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...

Avatar
Willr

Forum Moderator, 5513 Posts

1 July 2012 at 3:44pm

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.

Avatar
Thomashv

Community Member, 33 Posts

15 August 2012 at 9:46am

Edited: 15/08/2012 9:47am

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

Avatar
edwardlewis

Community Member, 32 Posts

10 September 2012 at 4:14am

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.

Go to Top