求助:ckfinder上传图片选择“浏览服务器”,提示“无效请求”

it_aoo 2016-11-19 10:32:50
问题:在ckeditor/ckfinder中上传图片选择“浏览服务器”,提示“无效请求”。但之前在apache环境下没有这个问题,一切正常,在iis下出现这个问题。可以看到浏览器地址为:http://localhost/js/ckfinder/ckfinder.html?Type=Images&CKEditor=editor01&CKEditorFuncNum=0&langCode=zh-cn

1.ckfinder和ckeditor目录如下:C:\inetpub\wwwroot\js\ckeditor,C:\inetpub\wwwroot\js\ckfinder。
2.js代码如下:
var oCKeditor = CKEDITOR.replace('editor01'); 
CKFinder.setupCKEditor(oCKeditor, '/js/ckfinder/' );

其中路径改为 '../ckfinder/'也不行。
alert显示setupCKEditor执行完毕,无返回值。之前写成SetupCKEditor不执行,但apache没事。
3.ckeditor的config.js配置如下:
config.filebrowserImageBrowseUrl = '/js/ckfinder/ckfinder.html?Type=Images';  
config.filebrowserImageUploadUrl = '/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images';

4.ckfinder的config.php配置如下:
'baseUrl'      => '/js/ckfinder/upimages/',

5.跟踪日志显示config.php 执行完毕。
6.php日志错误记录:
PHP Fatal error: Uncaught exception 'CKSource\CKFinder\Exception\InvalidConfigException' with message 'The temporary folder is not writable for CKFinder' in C:\inetpub\wwwroot\js\ckfinder\core\connector\php\vendor\cksource\ckfinder\src\CKSource\CKFinder\Config.php:330
Stack trace:
#0 C:\inetpub\wwwroot\js\ckfinder\core\connector\php\vendor\cksource\ckfinder\src\CKSource\CKFinder\Config.php(73): CKSource\CKFinder\Config->validate()
#1 C:\inetpub\wwwroot\js\ckfinder\core\connector\php\vendor\cksource\ckfinder\src\CKSource\CKFinder\CKFinder.php(91): CKSource\CKFinder\Config->__construct('C:\inetpub\wwwr...')
#2 C:\inetpub\wwwroot\js\ckfinder\core\connector\php\vendor\pimple\pimple\src\Pimple\Container.php(113): CKSource\CKFinder\{closure}(Object(CKSource\CKFinder\CKFinder))
#3 C:\inetpub\wwwroot\js\ckfinder\core\connector\php\vendor\cksource\ckfinder\src\CKSource\CKFinder\CKFinder.php(185): Pimple\Container->offsetGet('config')
#4 C:\inetpub\wwwroot\js\ckfinder\core\connector\php\connector.php(18): CKSource\CKFinder\CKFinder->__ in C:\inetpub\wwwroot\js\ckfinder\core\connector\php\vendor\cksource\ckfinder\src\CKSource\CKFinder\Config.php on line 330

求高手指点!
...全文
460 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
傲雪星枫 2016-11-20
  • 打赏
  • 举报
回复
'The temporary folder is not writable for CKFinder 你的apache用户有权限写,而IIS用户没有没有权限写。 把文件夹改为777试试
it_aoo 2016-11-19
  • 打赏
  • 举报
回复
补充一下,权限应该也没有问题。因为之前用file_put_contents的时候,总是拒绝访问,修改权限后,file_put_contents已经可以正常输出调试信息到项目文件夹下。

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧