저는 Codeigniter에 mysql (i)을 사용하지만 PostgreSQL을 연결해야하는 고객이 있습니다. 나는 보통의 설정을 시도하고 Postgre의 특정 포트를 추가하지만이 오류 얻을 : 이제Codeigniter 데이터베이스를 연결하는 PostgreSQL 오류
$active_group = (ENVIRONMENT == 'development') ? 'offline' : 'online';
//Set to 'development' in file: index.php
$active_record = TRUE;
/**
* OFFLINE CONFIGURATION
*/
$db['offline']['hostname'] = 'localhost';
$db['offline']['username'] = 'root';
$db['offline']['password'] = 'root';
$db['offline']['database'] = 'testing';
$db['offline']['dbdriver'] = 'postgre';
$db['offline']['dbprefix'] = '';
$db['offline']['pconnect'] = TRUE;
$db['offline']['db_debug'] = TRUE;
$db['offline']['cache_on'] = FALSE;
$db['offline']['cachedir'] = '';
$db['offline']['char_set'] = 'utf8';
$db['offline']['dbcollat'] = 'utf8_general_ci';
$db['offline']['swap_pre'] = '';
$db['offline']['autoinit'] = TRUE;
$db['offline']['stricton'] = FALSE;
$db['offline']['port'] = 5432;
/**
* ONLINE CONFIGURATION
*/
$db['online']['hostname'] = '?';
$db['online']['username'] = '?';
$db['online']['password'] = '?';
$db['online']['database' ....
//Continues with online configuration...
내가 사용 :
Unable to connect to your database server using the provided settings.
내 코드는 단순히이입니다 지금은 offline
구성이며 위의 오류를 보여주는 작동하지 않습니다. 나는 "db_debug"를 FALSE로 설정하려고 시도했으나 작동하지만 느낌을 줄이는 것만으로 오프라인 모드에서 데이터베이스 오류를 표시하지 않을 것입니다 ...
나는 pgAdmin이 열려 있습니다. 동일한 데이터베이스에 연결되어 있고 정상적으로 작동하고 있습니다. 이것에 대한 어떤 힌트?
Tku. 나는 해봤지만 작동하지 않습니다.오류 : 메시지 경고 : require_once를을 (.../시스템/데이터베이스/드라이버/포스트 그레스/postgres_driver.php가) : 스트림을 열지 못했습니다 : PHP는 오류가 심각도 가 검출 된 해당 파일이나 디렉토리 파일 이름 : 데이터베이스/DB.php 줄 번호 : 140 실제로 'postgre'가 아닌'postgres'는 다음과 같습니다. http://ellislab.com/forums/viewthread/131807/#925186 –