No replies
Joined: 11/06/2008

CKFinder for CKEditor is one of the best image file uploaders/browsers available for Drupal.  I've installed it a few times now and I always forget the steps to get it working correctly.  Every time I install it, I get the following error when trying to upload an image:

"The file browser is disabled for security reasons. Please contact your system administrator and check the CKFinder configuration file."

Not sure if this is the best solution, but it works for me.  Here's what I had to do:

  1. Goto your modules/ckeditor/ckfinder folder
  2. Edit the config.php file with your favorite text editor.
  3. Remove this entire function:
    		function CheckAuthentication()
            // WARNING : DO NOT simply return "true". By doing so, you are allowing
            // "anyone" to upload and list the files in your server. You must implement
            // some kind of session validation here. Even something very simple as...
            // return isset($_SESSION['IsAuthorized']) && $_SESSION['IsAuthorized'];
            // ... where $_SESSION['IsAuthorized'] is set to "true" as soon as the
            // user logs in your system. To be able to use session variables don't
            // forget to add session_start() at the top of this file.
            return false;
  4. Add this line of code right under  $baseUrl = '/ckfinder/userfiles/';
    		require_once '../../../../includes/filemanager.config.php';

    NOTE:  I store my modules in httpdocs/sites/all/modules/ckeditor/ckfinder.  If you store your modules in the "modules" directory in the root directory, then use this

    		require_once '../../includes/filemanager.config.php';