CKFinder Standalone Error: Folder not found. Please refresh and try again

CKFinder Standalone Error: Folder not found. Please refresh and try again

我已经独立配置了我的 CKFinder,但我一直收到

Folder not found. Please refresh and try again.

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

我需要帮助来找出问题所在。

经过几个月的研究和修改,我明白了 CKFinder 请求文件的方式,做 rewrite 会停止它的操作在某些方面,就像我经历过的那样,毕竟我的所有电子邮件都无法说明或解决。

为此,如果您将 and 和 运行 重写为

之类的问题

Folder not found. Please refresh and try again.

最好的办法是简单地关闭 CKFinder 文件夹中的重写规则

RewriteEngine Off

这简单地解决了我的问题。

CKEditor 图片上传问题:

问题 1: 单击“浏览服务器”按钮时,它显示的警报为 "Folder not found. Please refresh and try again."

问题 2: 在上传选项卡中,选择图像文件后单击发送到服务器按钮,它显示警报为 "It was not possible to complete the request due to file system permission restrictions."

解决方案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));

就是这样。

我更改为 ckfinder/config.php 文件 $baseDir = $_SERVER['DOCUMENT_ROOT'].'/web/app/webroot/files/ckFinderFiles/'; 变量 & 成功了

在我的例子中,我通过在 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',
);

您可以编辑 config.php 的 ckfinder

// 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',
);

请将 ckfinder 文件夹更改为 777 看起来文件目录没有创建,所以为它创建文件文件夹和 chmod 777。 我的很活跃。

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',
);