KCFinder 'You do not have permission to list the files.'

可紊 提交于 2019-12-01 14:39:47

问题


I have a problem with the integration of KCFinder in ckeditor. The version of my ckeditor is 4.0 and the other (KCFinder version) is 2.52-dev.

Hi configure the config.js of ckeditor like that:

CKEDITOR.config.baseHref = "/ckeditor/";

CKEDITOR.editorConfig = function( config ) {
    // Define changes to default configuration here.
    // For the complete reference:
    // http://docs.ckeditor.com/#!/api/CKEDITOR.config

    config.contentsCss  = 'contents.css';
    config.language= 'it';
    config.height = '400px';
    config.uiColor = '#ffDC6E';

    //kcfinder per l'uoload delle immagini
    config.filebrowserBrowseUrl = 'kcfinder-2.51/browse.php?type=files';
    config.filebrowserImageBrowseUrl = 'kcfinder-2.51/browse.php?type=images';
    config.filebrowserFlashBrowseUrl = 'kcfinder-2.51/browse.php?type=flash';
    config.filebrowserUploadUrl = '../../../reserved/kcfinder-2.51/upload.php?type=files';
    config.filebrowserImageUploadUrl = '../../../reserved/kcfinder-2.51/upload.php?type=images';
    config.filebrowserFlashUploadUrl = '../../../reserved/kcfinder-2.51/upload.php?type=flash';    

    // Remove some buttons, provided by the standard plugins, which we don't
    // need to have in the Standard(s) toolbar.
    config.removeButtons = 'Subscript,Superscript';
    config.disableNativeSpellChecker = false;
    };

The integration is of but when I click to "Show files in the server" or when I upload an image the system says "You do not have permission to list the files" though the permissions are correct.

What is the problem? Tks Salvo


回答1:


I think the problem is that you also need to configure the setting in KCFinder. You need to locate config.php in KCFinder folder, for this:

'disabled' => true

change it to false then you should be able to upload file to your server.




回答2:


Is not the best way for secure raison, because to disable it inside config.php allow to all user to access it, the best way add the little code bellow inside the php file wich include your textarea :

$_SESSION['KCFINDER'] = array(
    'disabled' => false
);

Hopes that help.




回答3:


From the kcfinder website: By default KCFinder is disabled. If you just set this setting to false all public visitors can upload and manage files on your web site. It is recommended to override this setting with sesssion configuration so only authenticated users can use KCFinder.



来源:https://stackoverflow.com/questions/13760367/kcfinder-you-do-not-have-permission-to-list-the-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!