たぶん、これcodeigniterのバグ。
DBにコネクトしてコネクションIDを取得してるとこ。
system/database/DB_driver.phpの115行目辺り。
// ---------------------------------------------------------------- // Connect to the database and set the connection ID $this->conn_id = ($this->pconnect == FALSE) ? $this->db_connect() : $this->db_pconnect(); // No connection resource? Throw an error
pconnect を使う場合は、$this->db_pconnect() の戻り値をセットするんだけども、
SQLServer用のドライバーを見ると、
system
∟database
∟drivers
∟sqlsrv
∟sqlsvr_driver.php の89行目。
// --------------------------------------------------------------------
/**
* Persistent database connection
*
* @access private called by the base class
* @return resource
*/
function db_pconnect()
{
$this->db_connect(TRUE);
}
// --------------------------------------------------------------------
おいおい、return が無いじゃないか。
// --------------------------------------------------------------------
/**
* Persistent database connection
*
* @access private called by the base class
* @return resource
*/
function db_pconnect()
{
return $this->db_connect(TRUE);
}
// --------------------------------------------------------------------
これで解決。
