views:

160

answers:

3

Hello,

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

+1  A: 

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

Greg
thanks both, I think that workedI see a whole lot off other errors, but not this one now
Richard
+1  A: 

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.

A: 

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.

Niels Bom