1.7.2에서 2.0.3까지 실행되는 Codeigniter 응용 프로그램을 업그레이드하고 있지만 SQL Server에 연결할 수 없습니다. 두 버전 모두 PHP 5.2.10을 실행하는 동일한 서버에서 실행되며 동일한 SQL Server에 연결됩니다. Codeigniter 2.0.3 with SQL Server 활성 레코드
이
이 물론 내가 전화 컨트롤러에서 1.7.2$db['reports']['hostname'] = "mysqlserver";
$db['reports']['username'] = "sqluser";
$db['reports']['password'] = "sqlpass";
$db['reports']['database'] = "SQLReportDB";
$db['reports']['dbdriver'] = "mssql";
$db['reports']['dbprefix'] = "";
$db['reports']['pconnect'] = TRUE;
$db['reports']['db_debug'] = TRUE;
$db['reports']['cache_on'] = FALSE;
$db['reports']['cachedir'] = "";
$db['reports']['port'] = 972;
에서 작동 내가 사용 연결 문자열입니다 CI 2.0.3
Unable to connect to your database server using the provided settings.
Filename: core/Loader.php
Line Number: 260
에서 오류가 이 연결
$report_db = $this->load->database('reports', TRUE);
다음은 오류를보고하는 로더 파일의 기능입니다. 라인 (260)은 return DB($params, $active_record);
/**
* Database Loader
*
* @param string the DB credentials
* @param bool whether to return the DB object
* @param bool whether to enable active record (this allows us to override the config setting)
* @return object
*/
public function database($params = '', $return = FALSE, $active_record = NULL)
{
// Grab the super object
$CI =& get_instance();
// Do we even need to load the database class?
if (class_exists('CI_DB') AND $return == FALSE AND $active_record == NULL AND isset($CI->db) AND is_object($CI->db))
{
return FALSE;
}
require_once(BASEPATH.'database/DB.php');
if ($return === TRUE)
{
return DB($params, $active_record);
}
// Initialize the db variable. Needed to prevent
// reference errors with some configurations
$CI->db = '';
// Load the DB class
$CI->db =& DB($params, $active_record);
}
실제 연결 오류와 유사합니다. 자격 증명을 다시 확인 하시겠습니까? SQL 서버 로그의 내용은 무엇입니까? – stormdrain
$ db [ 'reports'] [ 'pconnect'] = FALSE로 설정하십시오. – Ivan
$ db [ 'reports'] [ 'pconnect'] = FALSE로 설정하려고 시도했습니다. 변경 없음. – getSurreal