Hi,
I had issues with using CKFinder in a proper manner when integrated with the Kohana 3 (PHP framework). I have managed to find a hack around this in CKFINDER. For those who use Kohana 3 with CKFinder they may not be able to get the function CheckAuthentication() to work correctly (the session variables seem to die before they reach the CheckAuthentication function):
Instead of explicitly (forceably) returning true to make the CKFinder work correctly, I have modified the code in ckfinder_php5.config and ckfinder_php4.config as follows. In the private function _BuildUrl( $url = "" ) line 127 I changed
return $url . $qs;
To
return $url . $qs . "&PHPSESSID=" . PHPSESSID;
and now everything works fine (the $_SESSION['IsAuthorized'] variable is remembered).
I am not sure if this is the panacea for this issue but it has worked for me!
I had issues with using CKFinder in a proper manner when integrated with the Kohana 3 (PHP framework). I have managed to find a hack around this in CKFINDER. For those who use Kohana 3 with CKFinder they may not be able to get the function CheckAuthentication() to work correctly (the session variables seem to die before they reach the CheckAuthentication function):
function CheckAuthentication() { // WARNING : DO NOT simply return "true". By doing so, you are allowing // "anyone" to upload and list the files in your server. You must implement // some kind of session validation here. Even something very simple as... return (isset($_SESSION['IsAuthorized']) && $_SESSION['IsAuthorized']); // ... where $_SESSION['IsAuthorized'] is set to "true" as soon as the // user logs in your system. To be able to use session variables don't // forget to add session_start() at the top of this file. }
Instead of explicitly (forceably) returning true to make the CKFinder work correctly, I have modified the code in ckfinder_php5.config and ckfinder_php4.config as follows. In the private function _BuildUrl( $url = "" ) line 127 I changed
return $url . $qs;
To
return $url . $qs . "&PHPSESSID=" . PHPSESSID;
and now everything works fine (the $_SESSION['IsAuthorized'] variable is remembered).
I am not sure if this is the panacea for this issue but it has worked for me!
Re: Kohana PHP framework issue