Hi,
First, I know that questions about "The file browser is disabled for security reasons" have been asked many times. I've searched and read alot, and I think mine differ at least a little:
How can we debug the "The file browser is disabled for security reasons." error ?
I use a PHP integration, so my session is already started by the framework. Except if CKFinder load his configuration by AJAX, it should also have the session. On the top of the config.php file, I've placed:
My authentication is stored in $_SESSION['user'], so in the CheckAuthentication() function, I've this:
... but I still have the error.
So I wanted to see what the function sees:
Boom, no more error message, and no debug.
I really have the feelling that the session is empty, or different between CKFinder and my webpage, but I can't find how to investigate this...
And BTW, who's calling the config.php file ?
First, I know that questions about "The file browser is disabled for security reasons" have been asked many times. I've searched and read alot, and I think mine differ at least a little:
How can we debug the "The file browser is disabled for security reasons." error ?
I use a PHP integration, so my session is already started by the framework. Except if CKFinder load his configuration by AJAX, it should also have the session. On the top of the config.php file, I've placed:
if(!isset($_SESSION) || empty($_SESSION)) session_start();
My authentication is stored in $_SESSION['user'], so in the CheckAuthentication() function, I've this:
function CheckAuthentication() { return isset($_SESSION['user_idealit']); }
... but I still have the error.
So I wanted to see what the function sees:
function CheckAuthentication() { var_dump($_SESSION['user_idealit']); return isset($_SESSION['user_idealit']); }
Boom, no more error message, and no debug.
I really have the feelling that the session is empty, or different between CKFinder and my webpage, but I can't find how to investigate this...
And BTW, who's calling the config.php file ?
Re: debugging "The file browser is disabled for security re
config.php is called by /ckfinder/core/connector/php/php5/Core/Config.php in the loadValues() method.
Also, the configuration is somewhat loaded using AJAX, on a query to :
/ckfinder/core/connector/php/connector.php?command=Init, so it will not have the current session activated by default.
Now I'm able to find that even if I start the session in the config file, CKFinder seem to have the same session, but empty. Both have:
But the one on my page is full, where the one in the CKFinder config file is an empty array...
Re: debugging "The file browser is disabled for security re
I just remembered that our framework save the session in his own folder, so a little
have fixed the problem.
hope it might help someone else...
Re: debugging "The file browser is disabled for security re
glad to see that you managed to get your integration to work. Many thanks for posting back the results of your efforts, this should make it easier for anyone encountering a similar issue in the future. Good luck with using CKFinder in your framework!
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!