Welcome Guest, Not a member yet? Register   Sign In
CI 1.7 With Oracle 8i
#1

[eluser]Unknown[/eluser]
Hi averybody.

Please help me to find out the problem with connection between CI 1.7 with Oracle 8i, I have tried many way but it's always fail.

This is my config/database.php
Code:
$db['default']['hostname'] = "MyData";
$db['default']['username'] = "USRNAME";
$db['default']['password'] = "PASS";
$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";

MyData is Oracle SID
But Always show error :

Quote:An Error Was Encountered

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

Please Help me with this one.

Thanks Before
#2

[eluser]TheFuzzy0ne[/eluser]
You haven't set a database name.
#3

[eluser]kgill[/eluser]
Database name isn't necessary for Oracle, the problem here is likely your PHP set-up. Things to look at, has PHP been compiled with an oracle home? If everything there is set up right there, are you using tnsnames? If yes then is MyData in the tnsnames file, if you aren't using that then you'll likely need to specify a proper oracle connect string, look at the PHP documentation for ocilogon in the user comments you'll see plenty of examples.
#4

[eluser]Marcelo Toscano[/eluser]
$dbConnString = "
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)
(HOST = hotstname or ip)
(PORT = 1521)
)
)
(CONNECT_DATA = (SERVER = DEDICATED) (SID = yousidname))
)";

$db['default']['hostname'] = $dbConnString;
$db['default']['username'] = "username";
$db['default']['password'] = "password";
$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";

This work to connect, but I'm having troubles to execute a query.
#5

[eluser]alejandronanez[/eluser]
Qhat problems do you have man?




Theme © iAndrew 2016 - Forum software by © MyBB