sunhater / kcfinder

KCFinder web file manager
http://kcfinder.sunhater.com
402 stars 209 forks source link

Session issue while integrating in CAKEPHP3 #151

Open jaganreddy opened 7 years ago

jaganreddy commented 7 years ago

I added following statement in my logincontroller $_SESSION['KCEDITOR']['disabled']=false; But KCFinder not reading this session variable.

When I adding following lines, session data is available but immediately, session is expiring.

session_name('CAKEPHP'); session_start(); print_r($_SESSION);

I am unable to figure out the solution. Please help me.

Thanks, Jagan

nabilayouchi commented 7 years ago

Hello, Use this instead in your loginController

$session = $this->request->session(); $session->write('KCFINDER.disabled' , false);

jaganreddy commented 7 years ago

Thanks for immediate response.

I tried that and same issue is coming

mirko-pagliai commented 7 years ago

You have to create an .htaccess file inside the KCFinder dir, like this:

<IfModule mod_php5.c>
    php_value session.cache_limiter must-revalidate
    php_value session.cookie_httponly On
    php_value session.cookie_lifetime 14400
    php_value session.gc_maxlifetime 14400
    php_value session.name CAKEPHP
</IfModule>