CodeIgniter Forums
Can someone explain this error? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Can someone explain this error? (/showthread.php?tid=24383)



Can someone explain this error? - El Forum - 11-08-2009

[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.


Can someone explain this error? - El Forum - 11-09-2009

[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.


Can someone explain this error? - El Forum - 11-10-2009

[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)))';