CKFinder modal opens homepage and does not show files

感情迁移 提交于 2021-02-11 12:47:16

问题


I am using CKFinder in a CodeIgniter project and the problem I have is that when I click to open the modal to upload new media the modal shows the homepage of my project and not the files in the folder. I am rebuilding the project from another project, so in earlier stages, CKFinder was working well. Things I suspect caused the problem:

  1. I changed the session driver from 'files' to database
  2. When I first built the project is was on http now it is on https

Useful information:

  1. After closer investigation, I found that when I open the modal it makes a request to connector.php but that gives a status code of 307 (temporary redirect) this then redirects to my homepage.
  2. I get the same results when I open CKFinder from the sample pages

I have it configured that all users are allowed to use ckfinder but I am suspecting that this is maybe not working so when anyone calls to ckfinder redirects take place and the modal calls the homepage instead.

I found only one similar question asked here before but it was not answered (maybe the question did not have enough information). I would appreciate any assistance.


回答1:


I found the problem. In order to use sessions in ckfinder config.php I used this:

 // Include the codeigniter framework
define("REQUEST", "external");
ob_start();
require('index.php');
ob_end_clean();
$CI =& get_instance();
$CI->load->library('session'); //if it's not autoloaded in your CI setup

This served me we when I first implemented in. But after reusing this ckfinder folder in another project with a few changes (see question) it started giving me problems. The problem was solved when I removed that piece of code. I'll have to figure out how to access session variables in another manner.



来源:https://stackoverflow.com/questions/62920698/ckfinder-modal-opens-homepage-and-does-not-show-files

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