dtjpnd7517
2016-05-30 21:17
浏览 108

使用php 5.6连接到远程oracle数据库

I have two machines:

  1. Windows 7 x64
  2. Windows server 2012 R2 x64

In the first machine I installed:

I connect to local/remote oracle databases without problem.

The second machine is a fresh server installation, it does not have local oracle dabatases, nothing. The idea is to connect to a remote oracle instace. So I made the same installation (apache and php with same versions as first machine), but the first error I found was that the oci8_11g extension is not loaded. My question is, do I need to install some "driver" or "client" for oracle in this server? The apache instance and php work as expected except with error mentioned.

图片转代码服务由CSDN问答提供 功能建议

我有两台机器:

  1. Windows 7 x64
  2. Windows server 2012 R2 x64

    在我安装的第一台机器中:

      \ n
    • Apache 2.4 TS VC11
    • PHP 5.6.19 TS VCC
    • php_oci8-2.0.8-5.6-ts-vc11-x64

      我没有问题地连接到本地/远程oracle数据库。

      第二台机器是新安装的服务器,它没有本地oracle dabatases,什么都没有。 想法是连接到远程oracle instace。 所以我做了相同的安装(apache和php与第一台机器的版本相同),但我发现的第一个错误是没有加载oci8_11g扩展。 我的问题是,我是否需要在此服务器中为oracle安装一些“驱动程序”或“客户端”? 除了提到错误外,apache实例和php按预期工作。

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • doutiao2540 2016-05-30 21:25
    已采纳

    You are using windows, right? In that case, you need to install Oracle Driver (http://www.oracle.com/technetwork/topics/winx64soft-089540.html). "Basic" package should do.

    Also uncomment this line from php.ini: extension=php_oci8.dll, or extension=php_oci811g.dll, or extension=php_oci812c.dll, depending on which oracle version you are using.

    点赞 评论

相关推荐 更多相似问题