• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] Session dont working - Class 'database' not found

#11
(10-19-2018, 02:26 AM)NespiCMS Wrote: Sorry, my mistake, this:
public $sessionDriver            = '\CodeIgniter\Session\Handlers\DatabaseHandler';

work fine, thanks a lot!

Hi how did you get it working? I get the same error "No database selected".
Code:
    //public $sessionDriver            = 'CodeIgniter\Session\Handlers\FileHandler';
    public $sessionDriver            = '\CodeIgniter\Session\Handlers\DatabaseHandler'; // I tried with or without backslash before Codeigniter.
    public $sessionCookieName        = 'mysession';
    public $sessionExpiration        = 7200;
    //public $sessionSavePath          = WRITEPATH . 'session';
    public $sessionSavePath          = 'ci_sessions';
    public $sessionMatchIP           = false;
    public $sessionTimeToUpdate      = 300;
    public $sessionRegenerateDestroy = false;
Reply

#12
(10-19-2018, 08:10 AM)happyape Wrote:
(10-19-2018, 02:26 AM)NespiCMS Wrote: Sorry, my mistake, this:
public $sessionDriver            = '\CodeIgniter\Session\Handlers\DatabaseHandler';

work fine, thanks a lot!

Hi how did you get it working? I get the same error "No database selected".
Code:
    //public $sessionDriver            = 'CodeIgniter\Session\Handlers\FileHandler';
    public $sessionDriver            = '\CodeIgniter\Session\Handlers\DatabaseHandler'; // I tried with or without backslash before Codeigniter.
    public $sessionCookieName        = 'mysession';
    public $sessionExpiration        = 7200;
    //public $sessionSavePath          = WRITEPATH . 'session';
    public $sessionSavePath          = 'ci_sessions';
    public $sessionMatchIP           = false;
    public $sessionTimeToUpdate      = 300;
    public $sessionRegenerateDestroy = false;

I had a problem in another, are you sure that you have created a session table "ci_sessions" in your database?
Reply

#13
(10-19-2018, 11:20 AM)NespiCMS Wrote:
(10-19-2018, 08:10 AM)happyape Wrote:
(10-19-2018, 02:26 AM)NespiCMS Wrote: Sorry, my mistake, this:
public $sessionDriver            = '\CodeIgniter\Session\Handlers\DatabaseHandler';

work fine, thanks a lot!

Hi how did you get it working? I get the same error "No database selected".
Code:
//public $sessionDriver            = 'CodeIgniter\Session\Handlers\FileHandler';
public $sessionDriver            = '\CodeIgniter\Session\Handlers\DatabaseHandler'; // I tried with or without backslash before Codeigniter.
public $sessionCookieName        = 'mysession';
public $sessionExpiration        = 7200;
//public $sessionSavePath          = WRITEPATH . 'session';
public $sessionSavePath          = 'ci_sessions';
public $sessionMatchIP           = false;
public $sessionTimeToUpdate      = 300;
public $sessionRegenerateDestroy = false;

I had a problem in another, are you sure that you have created a session table "ci_sessions" in your database?

Yes I did already and it was a different issue. Everything works fine now.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.