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

temp folder


Reply


5 Posts   1671 Views

Avatar
joninjas

Community Member, 32 Posts

17 September 2010 at 8:33am

Mates!

I always did a temp-folder for silverstripe installations that I could delete the temp data on the server when needed (I needed it when I did changes of html SS code that it would change immediately in the browser with the deletion of temp files on the server).

For this I needed to put this code into an _ss_environment.php file which was in the root folder of all silverstripe installations.

<?php

define('TEMP_FOLDER', dirname(getcwd())."/tmp");

?>

But this doesn't work anymore in the version 2.4.1.
Any advise how I could use that feature in newer versions?

Cheers
Jonas

Avatar
Willr

Forum Moderator, 5513 Posts

17 September 2010 at 3:03pm

AFAIK nothing should have changed in 2.4.1 that would have broken that. Do you just get it writing the cache to the incorrect folder?

Have you checked that SS is loading that environment file (i.e by putting a die() in it).

Avatar
joninjas

Community Member, 32 Posts

17 September 2010 at 11:44pm

Hi Willr,

Thanks for your answer. It still doesn't work.

Asked differently: How can I achieve to have a temp directory of the 'viewed sites' where I can delete all the files if necessary on the server. I used to do that in earlier versions because only with this approach I could get rid of old *.ss html stuff when I changed html *.ss files. I experienced that *.ss files are not being updated straight away because there is a temp directory on the server. With the file in the first post I could bypass these files into a folder in my SS directory.
With 2.4.1 I just get a blank page and nothing is being dumped into the tmp directory.

Cheers
Jonas

Avatar
WorkingSolution

Community Member, 18 Posts

18 September 2010 at 7:14am

Edited: 18/09/2010 7:17am

It's easy to "build" a "own" silverstripe-cache:

- create a folder named "silverstripe-cache" in the root-directory of your silverstripe-installation.
- set the folder to chmod 0777 ( or eq. on Windows-os to read/write)
- start your /home with the parameter /?flush=1:
http://<YOURSITENAME>/?flush=1

after this all temporary files would be build in this directory. If you have root-level-rights, you can delete the cache using a cronjob. But this is not the sense of caches bthw.

Attached Files
Avatar
joninjas

Community Member, 32 Posts

18 September 2010 at 10:37pm

Thanks mate!

That was exactly what I was looking for!

Cheers
Jonas