vanillaforums/Garden — Issue #1304: is_dir fails with safemode/open_basedir in Gdn_FileSystem/Gdn_FileCache
Author: x00
Created: 2012-02-08 00:56:42+00:00
State: open

If safe mode is on an open_basedir is set (a common setup), Is_dir can fail if you don't have permissions over a folder. here is the offending code:

```php
FC = new Gdn_Filecache();
/*Bad*/
//$this->FC->AddContainer(array(Gdn_Cache::CONTAINER_LOCATION=>PATH_LOCAL_CACHE.'/karmacache'));
/*Ok*/
$this->FC->AddContainer(array(Gdn_Cache::CONTAINER_LOCATION=>'./cache/karmacache/'));
```

There is no need since php 5 to recursive is_dir/mkdir instead use:

```php