CodeIgniter icon indicating copy to clipboard operation
CodeIgniter copied to clipboard

Database warning using PDO DBLIB "driver does not support setting attributes"

Open CrazyCodeUK opened this issue 10 years ago • 1 comments

Seems to be the same issue as [https://github.com/bcit-ci/CodeIgniter/issues/4674] which is listed as fixed for 3.0.7

I am using CI 3.1.0

The error i am getting is:

`A PHP Error was encountered

Severity: Warning

Message: PDO::__construct() [pdo.--construct]: SQLSTATE[IM001]: Driver does not support this function: driver does not support setting attributes

Filename: pdo/pdo_driver.php

Line Number: 133`

I have tried with both the configs below with the same effect: $db['kx'] = array( 'dsn' => 'dblib:host=house;dbname=germ', 'username' => '****', 'password' => '****', 'dbdriver' => 'pdo', 'db_debug' => TRUE ); and $db['kx'] = array( 'dsn' => 'dblib:host=house;dbname=germ', 'hostname' => 'house', 'username' => '****', 'password' => '****', 'database' => 'germ', 'dbdriver' => 'pdo', 'dbprefix' => '', 'pconnect' => FALSE, 'db_debug' => TRUE, 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE ); with the executing code being: $kxdb = $this->CI->load->database('kx',TRUE); return $result = $kxdb->query("EXEC ClientUKC_RoomExport")->result();

CrazyCodeUK avatar Jul 27 '16 10:07 CrazyCodeUK

That line is empty.

Edit: And 3.0.7 became 3.1.0.

Also, please don't open a new issue when you can comment on an old one.

narfbg avatar Jul 27 '16 11:07 narfbg