Welcome Guest, Not a member yet? Register   Sign In
Can someone explain this error?
#1

[eluser]mhel_dc[/eluser]
Code:
$active_group  = "abora";
$active_record = TRUE;

$db['abora']['hostname'] = "(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = oraserver.domain.com)(PORT = 1522)))(CONNECT_DATA =(SERVICE_NAME = orasid)))";
$db['abora']['username'] = "orauser";
$db['abora']['password'] = "orapass";
$db['abora']['database'] = "";
$db['abora']['dbdriver'] = "oci8";
$db['abora']['dbprefix'] = "";



Quote:A PHP Error was encountered

Severity: Notice

Message: Use of undefined constant OCI_COMMIT_ON_SUCCESS - assumed 'OCI_COMMIT_ON_SUCCESS'

Filename: database/DB.php

Line Number: 133

I need pro comments here... please.
#2

[eluser]JoostV[/eluser]
This looks like a bug.

I looked into my 1.7.1 install and found that the constant OCI_COMMIT_ON_SUCCESS is used in system/database/drivers/oci8/oci8_driver.php, but it was never defined anywhere. Hence the error.
Code:
// Set "auto commit" by default
var $_commit = OCI_COMMIT_ON_SUCCESS;

Set it beforehand and you should be fine. Or, it may be fixed in 1.7.2 or SVN trunk.
#3

[eluser]vitoco[/eluser]
[quote author="mhel_dc" date="1257767825"]
Code:
// if you change "" to '' , non of the code inside the string will we interpreted as variable or constant,
//and if you have a constant inside, you'll have concatenate
$db['abora']['hostname'] = '(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = oraserver.domain.com)(PORT = 1522)))(CONNECT_DATA =(SERVICE_NAME = orasid)))';




Theme © iAndrew 2016 - Forum software by © MyBB