CKFinder独立错误:找不到文件夹。请刷新并重试

时间:2015-04-24 16:54:06

标签: php ckfinder

我已经单独配置了我的CKFinder,但我一直在

  

找不到文件夹。请刷新并重试。

我做错了什么? 我确保CheckAuthentication()工作正常。我的$baseUrl也完好无损,我在浏览器上进行了测试,以确保可以访问创建的文件夹。我的文件权限设置为0755 for folders0777 for filess

我需要帮助找出可能出错的地方。

5 个答案:

答案 0 :(得分:1)

CKEditor图片上传问题:

问题1:单击“浏览服务器”按钮时,它会显示警告为“#34;未找到文件夹”。请刷新并重试。"

问题2:在“上传”标签中,选择图像文件,然后单击“将其发送到服务器”按钮,它会将警报显示为"由于以下情况无法完成请求文件系统权限限制。"

<强>解决方法1: 打开filemanager.config.php:

更改以下行

$_SESSION['ckeditor']['UserFilesAbsolutePath'] = $_SESSION['ckeditor'][$_GET['id']]['UserFilesAbsolutePath'];

$_SESSION['ckeditor']['UserFilesAbsolutePath'] = '/var/www/html/domain/sites/subdomain/files/';

<强>溶液2: 打开ckediotr.lib.inc:

更改以下行

$_SESSION['ckeditor'][$profile_name]['UserFilesAbsolutePath'] = strtr($profile->settings['UserFilesAbsolutePath'], array("%f" => variable_get('file_public_path', conf_path() . '/files'), "%u" => $user->uid, "%b" => base_path(), "%d" => ckeditor_get_document_root_full_path(), "%n" => $user->name));

    $_SESSION['ckeditor'][$profile_name]['UserFilesAbsolutePath'] = strtr($profile->settings['UserFilesAbsolutePath'],
 array("%f" => variable_get('file_public_path', conf_path() . '/files'), "%u" => $user->uid, "%b" =>**'/domainname/'**, "%d" => ckeditor_get_document_root_full_path(), "%n" => $user->name));

那就是它。

答案 1 :(得分:1)

我已更改为ckfinder/config.php文件$baseDir = $_SERVER['DOCUMENT_ROOT'].'/web/app/webroot/files/ckFinderFiles/';变量&amp;这就是诀窍

答案 2 :(得分:1)

您可以编辑ckfinder的config.php

// Development
// error_reporting(E_ALL);
// ini_set('display_errors', 1);

编辑为

// Development
error_reporting(E_ALL);
ini_set('display_errors', 1);

要知道错误在哪里。 这是您可以参考的我的配置部分。 我使用的服务器是Linux Ubuntu。

$config['backends'][] = array(
    'name'         => 'default',
    'adapter'      => 'local',
    'baseUrl'      => '/files/',
//  'root'         => '', // Can be used to explicitly set the CKFinder user files directory.
    'chmodFiles'   => 0777,
    'chmodFolders' => 0755,
    'filesystemEncoding' => 'UTF-8',
);

请将chmod ckfinder文件夹更改为777 似乎未创建文件目录,因此请创建文件文件夹和chmod 777。 我很活跃。

答案 3 :(得分:0)

就我而言,我通过在Ubuntu中设置权限来获得解决方案,如下所示:

sudo chmod -R 777 /var/www

ckfinder/config.php的配置如下:

$config['backends'][] = array(
    'name'         => 'default',
    'adapter'      => 'local',
    'baseUrl'      => 'http://localhost/dmc-burn/upload/ckfinder/userfiles/',
//  'root'         => '', // Can be used to explicitly set the CKFinder user files directory.
    'chmodFiles'   => 0777,
    'chmodFolders' => 0755,
    'filesystemEncoding' => 'UTF-8',
);

答案 4 :(得分:0)

url - ckfinder/config.php
in this config.php file go to this

$config['backends'][] = array(
    'name'         => 'default',
    'adapter'      => 'local',
    'baseUrl'      => 'https://example.com/ckfinder/userfiles/',// here write full path of your site address to folder ckfinder. that its "its work form me."
//  'root'         => '', // Can be used to explicitly set the CKFinder user files directory.
    'chmodFiles'   => 0777,
    'chmodFolders' => 0755,
    'filesystemEncoding' => 'UTF-8',
);