drddx3115 2011-07-01 14:24
浏览 466
已采纳

PHP和Oracle - oci_connect()ORA-12705:无法访问NLS数据文件

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

  • 写回答

3条回答 默认 最新

  • dongle19863 2011-07-03 19:19
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 matlab有关常微分方程的问题求解决
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法