Welcome Guest, Not a member yet? Register   Sign In
Can not use session out slide application folder in CI 3.0
#1

(This post was last modified: 04-12-2015, 06:05 PM by nutt198.)

I have problem with CI 3.0 to use session outside application folder for Ckfinder and set authentication below but show error disable security reasons.


$sess = unserialize($_COOKIE['ci_session']);

if($sess['sess_xxxxxxx']!="xxxxx"){
return false;
}else{
return true;
}

I've tried with CI 3.0 Dev it working good. Thank you for answer in advance.
Reply
#2

I also have similar problem. Seems that in CI 3, $_SESSION is not an alias for native session.
Thus, $_SESSION in you CI application is different from "the real" $_SESSION.
I still don't get any idea how to solve this. Probably using $_COOKIE instead of $_SESSION will work. But I don't think it is save.
Reply
#3

Shortly before the final CI3 release the session library and its drivers have been replaced. Cookie-based session storage is not implemented intentionally.
Reply
#4

How about native session? http://forum.codeigniter.com/thread-61415.html
Reply
#5

I know the tricky answer. Maybe there is an easier way, but I don't know it.

For me I integrated long time ago a standalone file manager (KCFinder) in a way that works in any session driver. But there are two things to be done:

1. Some modification of the file manager's code is needed. Calling session_start() there is not good, CodeIgniter is to initialize the session.

2. How? I implemented loading CodeIgniter core in non-MVC way. The function get_instance() works, it returns a dummy controller with the usual properties, get_instance()->session and etc. And the loaded core initializes itself using the CodeIgniter settings, including the session settings. Thus, the external file manager uses the same session, created by CodeIgniter.

See how a demo non-MVC page looks like: https://github.com/ivantcholakov/starter...c/demo.php

This is one of the entry files of the file manager - I create CodeIgniter's core there too: https://github.com/ivantcholakov/starter...browse.php

And then: https://github.com/ivantcholakov/starter...r.php#L123

3. The good side of such an integration is that the file manager's configuration settings also can be tweaked by CodeIgniter (depending on user credentials). For example, the file manager may be enabled for power users only, this is CodeIgniter to determine who is who.
Reply
#6

Concerning CKFinder, as far as I can see, it is not free software. The developers of CKFinder could have been created a common way how the file manager could be integrated to a MVC framework. Examine their source and documentation. Maybe you should ask a question at their forum.
Reply
#7

CKFinder != KCFinder
Reply
#8

(This post was last modified: 04-22-2015, 02:09 PM by InsiteFX.)

KCFinder is free software.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#9

$session_id = $_COOKIE['ci_session'];
$content = file_get_contents(dirname(__FILE__) . '/../../application/cache/ci_session/ci_session' . $session_id);
session_start();
session_decode($content);
Reply




Theme © iAndrew 2016 - Forum software by © MyBB