用户
 找回密码
 入住 CI 中国社区
搜索
查看: 1297|回复: 1
收起左侧

[HELP] CI连接oracle12c?

[复制链接]
发表于 2016-5-28 09:49:21 | 显示全部楼层 |阅读模式
用的是dilicms,dilicms是用ci做的框架,想请教大家这个代码可以连接oracle12c吗?
如果可以,参数怎么设置呢!!!求教求教!!!

目前我的参数设置如下:

$db['default']['hostname'] = '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.5)(PORT = 1521)))(CONNECT_DATA=(SID=orcl)))';
$db['default']['username'] = 'scott';
$db['default']['password'] = '123456';
$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;



结果提示:Use of undefined constant OCI_COMMIT_ON_SUCCESS - assumed 'OCI_COMMIT_ON_SUCCESS'




我的PHP配置环境是这样的,也不知道我配的对不对:
Configure Command
cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared" "--with-enchant=shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--disable-static-analyze"






本版积分规则