title: CKFinder - Folder not found While Uploading Files on Server
body: <p>I'm trying to integrate CKFinder(v.3) with CKEditor(v.4) in my Codeigniter project but getting error "Folder not found" when i tried to upload a file on to server. I hv googled this issue and tried various solutions like below but none had worked:</p>
  
  <p>1) Changing permission for ckfinder folder to FULL for all users</p>
  
  <p>2) Changing permission for data-content/page_assets folder to FULL for all users</p>
  
  <p>3) Set baseURL path in config.php to "<a href="http://localhost:8080/project/cms/js/ckfinder/userfiles/" rel="nofollow noreferrer">http://localhost:8080/project/cms/js/ckfinder/userfiles/</a>"</p>
  
  <p>Below are the editor setup in my view file</p>
  
  <pre><code>// filebrowserBrowseUrl &amp; filebrowserUploadUrl will be different for each module but the base will
  // same 'data-content'
  CKEDITOR.replace( 'page_content', {
      filebrowserBrowseUrl: '&lt;?php echo base_url()?&gt;js/ckfinder/ckfinder.html?Type=Images&amp;rlf=0&amp;start=Images:/project/data-content/page_assets/',
      filebrowserUploadUrl: '&lt;?php echo base_url()?&gt;js/ckfinder/core/connector/php/connector.php?command=QuickUpload&amp;type=Images&amp;currentFolder=/project/data-content/page_assets/',
      filebrowserWindowWidth: '1000',
      filebrowserWindowHeight: '700'
  });
  </code></pre>
  
  <p>Below are the config.php in CKFinder. Listing only what i had changed in this file</p>
  
  <pre><code>$config['authentication'] = function () {
      return true;
  };
  
  $config['backends'][] = array(
      'name'         =&gt; 'default',
      'adapter'      =&gt; 'local',
      //'baseUrl'      =&gt; '/ckfinder/userfiles/',
      'baseUrl'      =&gt; 'http://localhost:8080/project/cms/js/ckfinder/userfiles/',
  //  'root'         =&gt; '', // Can be used to explicitly set the CKFinder user files directory.
      'chmodFiles'   =&gt; 0777,
      'chmodFolders' =&gt; 0755,
      'filesystemEncoding' =&gt; 'UTF-8',
  );
  
  $config['overwriteOnUpload'] = false;
  $config['checkDoubleExtension'] = true;
  $config['disallowUnsafeCharacters'] = true;
  $config['secureImageUploads'] = true;
  $config['checkSizeAfterScaling'] = true;
  $config['htmlExtensions'] = array('html', 'htm', 'xml', 'js');
  $config['hideFolders'] = array('.*', 'CVS', '__thumbs');
  $config['hideFiles'] = array('.*');
  $config['forceAscii'] = false;
  $config['xSendfile'] = false;
  
  // https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_debug
  $config['debug'] = true;
  </code></pre>
  
  <p>Detail error, after debugging on</p>
  
  <pre><code>Fatal error:  Uncaught CKSource\CKFinder\Exception\FolderNotFoundException: Folder not found in C:\xampp\htdocs\project\cms\js\ckfinder\core\connector\php\vendor\cksource\ckfinder\src\CKSource\CKFinder\Filesystem\Folder\WorkingFolder.php:144
  </code></pre>
  
  <p>These are the concerned code block from WorkingFolder.php file</p>
  
  <pre><code>
  // Check if resource type folder exists - if not then create it
  $currentCommand = (string) $request-&gt;query-&gt;get('command');
  $omitForCommands = array('Thumbnail');
  
  // DEBUGGING the value of EACH PROPERTY
  // clientCurrentFolder =&gt; /noveltech/data-content/page_assets/
  // $currentCommand =&gt; QuickUpload
  // $resourceTypeDirectory =&gt; images
  // $this-&gt;path =&gt; images/noveltech/data-content/page_assets/ 
  
  if (!in_array($currentCommand, $omitForCommands) &amp;&amp; !empty($resourceTypeDirectory) &amp;&amp; !$backend-&gt;hasDirectory($this-&gt;path))
  {
     if ($this-&gt;clientCurrentFolder === '/') {
         @$backend-&gt;createDir($resourceTypeDirectory);
  
         if (!$backend-&gt;hasDirectory($resourceTypeDirectory))
         {
             throw new AccessDeniedException("Couldn't create resource type directory. Please check permissions.");
          }
     }
     else {
       throw new FolderNotFoundException(); // THIS IS LINE NO. 144
     }
  }
  </code></pre>
  
  <p>My development environment is XAMPP.</p>
  
  <p>Can any one please help me in integrating CKFinder?</p>
  
  <p>Much Regards,</p>
  
  <p>Javed</p>