CKFinder in Drupal

Help
http://docs.cksource.com/CKFinder_2.x/Developers_Guide

Extract the downloaded .tar.gz file and copy the ckfinder folder into /sites/all/modules/contrib/ckeditor/ckfinder

Edit /sites/all/modules/contrib/ckeditor/ckfinder/config.php

delete the following function (lines 21 -34)

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().
 
    return false;
}

After line 48:

$baseUrl = '/ckfinder/userfiles/'; 

insert the following line:

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

enable write permissions on /sites/default/settings.php

Edit settings.php

Change the value of $cookie_domain (line 169) to your drupal site's domain name

$cookie_domain = "www.yoursite.com";
$cookie_domain = 'http://yoursite:8888';

Save settings.php and change it's permissions back to read only

Reports Error

CKEditor 4.0.1
You are using a feature that requires $cookie_domain to be set, but it is not set in your settings.php file (CKFinder is enabled in the Advanced profile).
https://drupal.org/node/719238
Uncomment and set the cookie domain line the settings file.

Cont.:

login to your drupal site as an administrator and navigate to:
/admin/user/permissions

enable the following for authenticated users:
access ckeditor
allow CKFinder file uploads

Save permissions.

Navigate to /admin/settings/ckeditor

edit the Advanced Profile

Change the following settings so that they all use CKFinder:
Filebrowser type (link dialog)
Filebrowser type (image dialog)
Filebrowser type (flash dialog)

CKEditor is now configured to use CKFinder as it's file browser!

* line numbers, install / config time, and fanciness may vary!

Issues

PHP error: 'The temporary folder is not writable for CKFinder'
Chmodded CKFINDER folder..
Now..
“Image source URL is missing”
You are using different domains (office. and www.) so the browser doesn't allow the communication between the windows.

/sites/all/modules/ckeditor/ckeditor/ckfinder/samples/full-page-open.html
“Invalid request.”

'The temporary folder is not writable for CKFinder'

Console error:
Failed to load resource: the server responded with a status of 500 (Internal Server Error) connector.php

In the end, these problems were from doing this process as an upgrade, as opposed to a clean install. Doing a clean install with all new verified versions did the trick.

183 reads • Last Modified: Tuesday, April 18, 2017