有关OCIBindByName的奇怪问题
源程序:
----------------------------------------------------------------
<?php
putenv("LD_LIBRARY_PATH=/oracle/app/oracle/product/8.1.5/lib");
putenv("NLS_LANG=american.america.ZHS16CGB231280");
putenv("ORACLE_BASE=/oracle/app/oracle");
putenv("ORACLE_HOME=/oracle/app/oracle/product/8.1.5");
putenv("ORACLE_SID=ora8");
putenv("ORA_NLS33=/oracle/app/oracle/product/8.1.5/ocommon/nls/admin/d
ata ");
$conn = OCILogon("scott", "tiger");
$stmt = OCIParse($conn,"insert into emp (empno, ename) "." values (no,
name) ");
$empno=2001;
$ename="中文字符";
OCIBindByName($stmt, "NO", &$empno, 32);
OCIBindByName($stmt, "NAME", &$ename, 32);
OCIExecute($stmt);
OCIFreeStatement($stmt);
OCILogoff($conn);
?>
----------------------------------------------------------------
出错信息:
----------------------------------------------------------------
Warning: OCIBindByName: ORA-01036: illegal variable name/number in /we
b/lhf.php on line 12
Warning: OCIBindByName: ORA-01036: illegal variable name/number in /we
b/lhf.php on line 13
Warning: OCIStmtExecute: ORA-00984: column not allowed here in /web/lh
f.php on line 14
----------------------------------------------------------------
刷新几次后出错信息变成了:
----------------------------------------------------------------
Warning: OCISessionBegin: ORA-12705: invalid or unknown NLS parameter
value specified in /web/lhf.php on line 8
Warning: Supplied argument is not a valid OCI8-Connection resource in
/web/lhf.php on line 9
Warning: Supplied argument is not a valid OCI8-Statement resource in /
web/lhf.php on line 12
Warning: Supplied argument is not a valid OCI8-Statement resource in /
web/lhf.php on line 13
Warning: Supplied argument is not a valid OCI8-Statement resource in /
web/lhf.php on line 14
Warning: Supplied argument is not a valid OCI8-Statement resource in /
web/lhf.php on line 15
----------------------------------------------------------------
只有重新启动netscape web server 才能出现最先的出错信息.
奇怪.
web server 目前以oracle的身份运行.