开发者

/tmp/cache directory problem

I have just started out with testing some php mvc framework

In it, it has this function that throws an error. The cachedirectory is set to /tmp/cache from the config file

additional: The php is开发者_如何学C hosted on an IIS server.

Can someone help me out to get this working somehow?

This is the function within the class

function setCacheDir($cacheDir = null)
    {
        if( is_null( $cacheDir ) )
        {
            $config = config::getInstance();
            $cacheDir = $config->config_values['template']['cache_dir'];
        }

        if (is_dir($cacheDir) && is_writable($cacheDir))
        {
            $config = config::getInstance();
            $this->cache_dir = $cacheDir;
        }
        else
        {

            throw new Exception("De cache directory '$cacheDir' either does not exist, or is unwriteble");
        }
    }

thanks, Richard


Why don't you set the cache directory to something a little more Windows-y, like c:\temp (and make sure that folder exists).


I'm guessing "/tmp/cache" doesn't exist and isn't writable, so in the configuration file, set cache_dir to a directory that is.


Some PHP frameworks work best (or better) in a LAMP stack, the first letter (L) being Linux. If the documentation of your framework advises a LAMP stack, I'd go with that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜