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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Random failed to open stream: No such file or directory with C:\Windows\TEMP\/silverstripe-cache


Reply


8 Posts   2848 Views

Avatar
web2works

Community Member, 50 Posts

18 February 2011 at 2:31am

Hi, I am getting a error every so often with following error. If happens both locally on WAMP windows and the Debian Linux server.

I am using Silverstripe version: 2.4.5

[Warning] include(C:\Windows\TEMP\/silverstripe-cacheC--wamp-www-cms/.cache.themes.default.templates.Page.ss) [function.include]: failed to open stream: No such file or directory
GET /cms/services/
Line 420 in C:\wamp\www\cms\sapphire\core\SSViewer.php

Source
411                $subtemplate => $subtemplateViewer->process($item, $cache)
412             ));
413          }
414       }
415       
416       $itemStack = array();
417       $val = "";
418       $valStack = array();
419       
420       include($cacheFile);
421
422       $output = $val;      
423       $output = Requirements::includeInHTML($template, $output);
424       
425       array_pop(SSViewer::$topLevel);
426
Trace
•SSViewer::process
Line 420 of SSViewer.php
•SSViewer->process(ServicesPage_Controller)
Line 202 of Controller.php
•Controller->handleAction(SS_HTTPRequest)
Line 143 of RequestHandler.php
•RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
•Controller->handleRequest(SS_HTTPRequest)
Line 199 of ContentController.php
•ContentController->handleRequest(SS_HTTPRequest)
Line 67 of ModelAsController.php
•ModelAsController->handleRequest(SS_HTTPRequest)
Line 282 of Director.php
•Director::handleRequest(SS_HTTPRequest,Session)
Line 125 of Director.php
•Director::direct(/services/)
Line 127 of main.php

Avatar
swaiba

Forum Moderator, 1804 Posts

18 February 2011 at 3:01am

you have the folder writeable (for the apache process)?

Avatar
web2works

Community Member, 50 Posts

18 February 2011 at 3:03am

I have not noticed this problem before. Although you may be right as this is something I have not had to set up before. Is there a guide on how to do this?

Thanks Ben

Avatar
swaiba

Forum Moderator, 1804 Posts

18 February 2011 at 3:08am

I've no idea - permissions have been driving me loopy recently after moving a server...

Avatar
Ryan M.

Community Member, 309 Posts

18 February 2011 at 7:53am

silverstripe-cache folder should be chmod 777, I think. Same for assets directory. Everything else I think you can leave alone, or if for some reason it isn't working, chmod php files to 755 and template, js, etc files to 644.

Avatar
web2works

Community Member, 50 Posts

23 February 2011 at 4:24am

Edited: 26/02/2011 8:25am

UPDATE:
Sadly I am still randomly getting this error even after creating the 'silverstripe-cache' directory and giving it full 777 permissions. This is both on Windows WAMP and Linux Debian.

Could it maybe be caused by the . prefix of the cache file? It this possible to overwrite?

Thanks

Avatar
swaiba

Forum Moderator, 1804 Posts

28 February 2011 at 2:44am

do you have something like this in your _config.php?

if (Director::isDev()) {
SSViewer::flush_template_cache();
}

removing this removed this error for me...

Avatar
SheaDawson

Community Member, 46 Posts

19 May 2011 at 12:43pm

Thanks swaiba, removing that worked for me too :)