Welcome Guest, Not a member yet? Register   Sign In
[Ask]Connectiong CI to Oracle
#1

[eluser]Siregar[/eluser]
I want to coneccting CodeIgniter to Oracle
I use oracle6i, CodeIgniter_2.0.2, PHP Version 5.3.5, and XAMPP 2,5. My Oracle is installed in other PC.

My configuration is like this :

Code:
$db['default']['hostname'] = '//178.178.2.82:1521/DBMD';
$db['default']['username'] = 'usermd';
$db['default']['password'] = 'coba';
$db['default']['database'] = '';
$db['default']['dbdriver'] = 'oci8';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;

but i always get error like this :
Quote:Use of undefined constant OCI_COMMIT_ON_SUCCESS - assumed 'OCI_COMMIT_ON_SUCCESS'

in my php, oci still configured well. I got error when configuring it. The error is like this:
Quote:Unable to load dynamic library 'C:\xampp\php\ext\php_oci8.dll

help me please..,thank's in advance.
#2

[eluser]Siregar[/eluser]
now my error is like this..,

i want to ask about my config error.
i have try many configuration example :
Code:
$dbhost = "178.178.2.82";    //host
$dbport= "1521";          //port default is 1521
$dbname = "DBMD";        //name of database  
$dbuser = "usermd";      //db user with all priviliges
$dbpassword = "honda";    // password of user
$dbConnString = "(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = ". $dbhost .")(PORT = ". $dbport ."))
  )(CONNECT_DATA =(SERVICE_NAME = ". $dbname .")))";  
$db['default']['hostname'] = $dbConnString;
$db['default']['username'] = $dbuser;
$db['default']['password'] = $dbpassword;
$db['default']['database'] = '';
$db['default']['dbdriver'] = 'oci8';

and like this,
Code:
$db['default']['hostname'] = '//178.178.2.82:1521/DBMD';
$db['default']['username'] = 'usermd';
$db['default']['password'] = 'honda';
$db['default']['database'] = '';
$db['default']['dbdriver'] = 'oci8';

but i get error like this,

Quote:A Database Error Occurred

Unable to connect to your database server using the provided settings.

Filename: D:\Siregar\Study\Sem IV\IBAD\KP\CodeIgniter_2.0.2\system\database\DB_driver.php

Line Number: 124

as additional info, i use oracle 6i and oci8.dll from oracle 10g in my xampp/apache/bin.
How to solve this problem, thank you in advance.




Theme © iAndrew 2016 - Forum software by © MyBB