Welcome Guest, Not a member yet? Register   Sign In
Problem with PDO and Session library
#1

[eluser]MarkoM[/eluser]
Hello!

I'm using PDO driver to access MySQL database. Everything is working OK on that part. My database.php looks like this:
Code:
$active_group = 'default';
$active_record = FALSE;

$db['default']['hostname'] = 'mysql:host=127.0.0.1:3386';
$db['default']['username'] = 'root';
$db['default']['password'] = '';
$db['default']['database'] = 'mydatabase';
$db['default']['dbdriver'] = 'pdo';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;

I don't use Active Record, I'm using stored procedures to get/alter my data.

The problem occurred when I auto-loaded session library and set it to use database. I created table in my database, and on first visit to site, a record gets inserted into session table. No problem there.
An error occurs on subsequent visits to the site. I'm getting following:
Quote:Fatal error: Call to undefined method CI_DB_pdo_driver::where() in P:\Git\TengWebsite\system\libraries\Session.php on line 201

I'm using latest of 2.1 branch downloaded from GitHub.

What to do?

Thank you!
Marko
#2

[eluser]Unknown[/eluser]
I'm having the same problem. Do not have the solution?




Theme © iAndrew 2016 - Forum software by © MyBB