dpmfur2635 2018-02-02 11:24
浏览 238

如何使用PHP 7连接到Oracle 11?

The problem is, i have an application that the client demands it runs under Oracle DB.

I already have Client 11c installed, as well as Oracle Database.

My PHP was built using the following configuration:

"--with-pdo-oci=c:\php-snap-build\deps_aux\oracle\x64\instantclient_12_1\sdk,shared"

So i copied the instant client to this folder, and put it in the system path as well.

Still i'm getting:

PS C:\php> php -m
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_oci' (tried: ./ext\pdo_oci (The specified module could not be found.), ./ext\php_pdo_oci.dll (%1 is not a valid Win32 application.)) in Unknown on line 0

When trying to run php -m with display_startup_errors = on

I've tried download other PHP Binaries and looked up on every possible corner of the internet.

Can anyone help me solve this?

P.S. PDO is a must.

Thanks in advance!

  • 写回答

1条回答

  • drn5375 2018-02-06 01:57
    关注

    Make sure your oracle client libraries are the same 32-bit or 64-bit architecture as PHP. Make sure whichever Oracle client libraries you want to use are first in PATH. If you use Instant Client you need to have the correct VS Redistributable, see http://www.oracle.com/technetwork/topics/winx64soft-089540.html or http://www.oracle.com/technetwork/topics/winsoft-085727.html

    评论

报告相同问题?

悬赏问题

  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题