CodeIgniter + Oracle Database (Remote)

Yes!!!! akhirnya bisa juga, seneng banget pokoknya udah beberapa minggu ngotak ngatik CI biar bisa connect ke Oracle. Setelah banyak artikel dan video yang di tonton, berhasil juga nge-dump wkwkwkwkw

Jadi selain di CI, di Web Server juga harus dikonfigurasi pdo_oci nya
phpinfo


pokoknya urusan sysadmin dah untuk server mah.

conf db CI

$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => 'oci:dbname=//IP:1521/SID;charset=UTF8',
'hostname' => '',
'username' => 'root',
'password' => 'root',
'database' => '',
'dbdriver' => 'pdo',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);

hilangkan petik ganda di codeigniter/system/database/DB_driver.php
ubah:
protected $_escape_char = '"';
jadi:
protected $_escape_char = '';

coba nge-dump di controllers Welcome.php
public function index()
{
$this->load->database();
$rs = $this->db->get("NAMA_TABEL")->result();
var_dump($rs);
//$this->load->view('welcome_message');
}


sekian ^_^

http://stackoverflow.com/questions/25649581/oracle-pdo-oci-charset-failing
https://www.youtube.com/watch?v=vS_j5OFaYnE

Comments