![]() |
CKFinder modal opens homepage and does not show files - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: CKFinder modal opens homepage and does not show files (/showthread.php?tid=77052) |
CKFinder modal opens homepage and does not show files - Lazarus-CG - 07-15-2020 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:
Useful information:
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 would appreciate any assistance.
RE: CKFinder modal opens homepage and does not show files - Lazarus-CG - 07-15-2020 I found the problem. In order to use sessions in ckfinder config.php I used this: Code: // Include the codeigniter framework RE: CKFinder modal opens homepage and does not show files - ivantcholakov - 07-15-2020 It is possible, in the past I modified the bootstrapping process of the framework. In this case I loaded the framework with calling a dummy controller and then session (database-driven) got accessible. Maybe there is an easier way, anyway, it is what I've got. Here is an example on how I load a similar filemanager: https://github.com/ivantcholakov/starter-public-edition-3/blob/v3.5.1/public/assets/kcfinder/browse.php You need two modes: - Normal MVC loading for the ordinary site pages; - Loading the framework from a different front-controller file (not index.php, but which is the file-browser for example, there may be others, upload, etc.) and in this case the framework calls a dummy controller that does nothing. The alternative front-controller does the job and accesses the session using the already initialized framework and session library. RE: CKFinder modal opens homepage and does not show files - jreklund - 07-16-2020 The easiest way to implement it are looking at how CodeIgniter database session library works and copying that source code into a custom library for CKFinder and re-writing those DB connections with PDO (or MySQLi) |