【问题标题】:CKFinder3 Invalid Request ErrorCKFinder3 无效请求错误
【发布时间】:2018-10-14 15:46:19
【问题描述】:

大家好! 我想使用 CKFinder 3 PHP 版本。

我从官网下载了CKFinder zip文件。

然后我安装 XAMPP 7.2.4 来部署 CKFinder。

我在 80 端口启动 Apache Web 服务器。

然后我将 CKFinder 文件复制到 /XAMPP/htdocs/

为了保证PHP环境正确,我按照官网创建了一个test.php,里面包含以下代码:

我也跟着官网更新config.php文件:

$config['authentication'] = function () {
return true;
};

现在一切正常,但是当我尝试访问 http://localhost/ckfinder/ckfinder.html 的 ckfinder.html 时,发生了一些错误。

我可以看到错误日志:

[04-May-2018 10:29:57 Europe/Berlin] PHP Fatal error:  Uncaught CKSource\CKFinder\Exception\InvalidConfigException:
 The temporary folder is not writable for CKFinder in 
 /Applications/XAMPP/xamppfiles/htdocs/ckfinder/core/connector/php/vendor/cksource/ckfinder/src/CKSource/CKFinder/Config.php:331

【问题讨论】:

    标签: php ckfinder


    【解决方案1】:

    test.php 文件似乎已过时,请确保您的系统满足以下要求:

    • PHP 5.6+ 注意:Dropbox 后端需要 PHP 7.0+。
    • 为缩略图支持和任何图像操作启用了 GD 扩展(大多数安装中的默认设置)。
    • FileInfo 扩展已启用。注意:在 XAMPP 上默认禁用,请阅读快速入门了解更多信息。
    • 支持 JSON MIME 类型。注意:默认情况下在 IIS Express 上禁用,请阅读快速入门了解更多信息。

    检查服务器上的错误日志,它应该有关于问题来源的更多详细信息。

    【讨论】:

    • 嗨,我更新了我的问题,看到我的 php 版本是 7.0+ 并且 test.php 运行正确
    • 检查错误日志。您有可能在配置文件中打错了字。例如忘记关闭字符串等。stackoverflow.com/questions/3719549/…
    • Thx,我发现了错误日志:临时文件夹对于 CKFinder 是不可写的,我打印了 'tempDirectory' ,它是 /var/folders/dc/5xk_d2bn02v05bsybw8q483c0000gn/T 。这是什么?
    • 您可以使用docs.ckeditor.com/ckfinder/ckfinder3-php/… 配置它@CKFinder 需要访问安全的 tmp 目录以进行文件验证,然后才能将它们移动到目标文件夹。因此,在您配置正确的 tmp 文件夹并使其可写后,它应该开始工作了。
    猜你喜欢
    • 2014-12-11
    • 2019-05-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-03
    • 2020-10-15
    • 2016-10-20
    相关资源
    最近更新 更多