PHP& Oracle-oci_connect()ORA-12705:无法访问NLS数据文件 [英] PHP & Oracle - oci_connect() ORA-12705: Cannot access NLS data files

查看:223
本文介绍了PHP& Oracle-oci_connect()ORA-12705:无法访问NLS数据文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经在服务器上使用Oracle多年了,但是IT部门的一位员工昨天在没有明确警告的情况下将其删除了,这确实是我们的系统!

我根据cwallenpoole的建议采取了行动(谢谢!),并取得了良好的进展,PHP现在至少包括了oracle函数(即oci_connect),但是我现在遇到了另一条错误消息:

"警告:oci_connect()[function.oci-connect]:ORA-12705:无法访问NLS数据文件或无效的环境"

我们确保tnsnames.ora等文件位于正确的位置,但仍然不高兴:(

谢谢

解决方案

好.这是我个人的噩梦.我在半夜醒来很严重...或者我没有醒来,但是我已经花了几天时间解决这个问题.

所以,这对我有用:

  1. 您是否具有 Oracle Instant Client ?如果没有得到它.
  2. 您是否拥有Oracle SDK ?如果没有得到它.
  3. 解压缩Instantclient.
  4. 将SDK解压缩到一个子目录
  5. 将ORACLE_HOME添加为导出的命令行变量(* nix中的$ ORACLE_HOME,win中的%ORACLE_HOME%).使其指向上述Instantclient文件夹的标准路径.
  6. 创建ORACLE_BIN并将其指向SDK.
  7. 将ORACLE_HOME添加到您的PATH.
  8. 重新启动Apache ...

所以...这就是我通常所做的...并且通常可以正常工作...通常...

我认为实际上我能说的就是好运和Godspeed.

We've been using Oracle on our server for years, but someone from IT removed it yesterday without clear warning and it's really thrown our systems!

I've acted on the advice from cwallenpoole (thank you!) and have made good progress, and PHP is now at least including the oracle functions (ie oci_connect) but I am now experiencing another error message:

"Warning: oci_connect() [function.oci-connect]: ORA-12705: Cannot access NLS data files or invalid environment"

We have ensured the tnsnames.ora etc files are in the correct place, but still having no joy :(

thank you

解决方案

Ok. This is my personal nightmare. I seriously wake up in the middle of the night... or I don't, but I have spent days on this problem.

So, this is what worked for me:

  1. Do you have Oracle Instant Client? If not get it.
  2. Do you have the Oracle SDK? If not get it.
  3. Unzip instantclient.
  4. Unzip the SDK into a sub-directory
  5. Add ORACLE_HOME as an exported command line variable ($ORACLE_HOME in *nix, %ORACLE_HOME% in win). Have it point to the fully-qualified path to the above instantclient folder.
  6. Create ORACLE_BIN and have it point to the SDK.
  7. Add ORACLE_HOME to your PATH.
  8. Restart Apache...

So... that is what I generally do... And generally it works... Mostly...

I think that realistically all I can say is Good Luck and Godspeed.

这篇关于PHP& Oracle-oci_connect()ORA-12705:无法访问NLS数据文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆