PHP, IIS, Oracle (OCI) not working

前端 未结 2 1761
醉酒成梦
醉酒成梦 2021-01-17 01:02

We are migrating from a Windows SBS 2011 to Windows Server 2012 R2.

We have an internal website that connects to our Oracle database using PHP.

I am trying

相关标签:
2条回答
  • 2021-01-17 01:21

    try this:

    extension=php_oci8_12c.dll (instead of php_oci8.dll) - that is what I am using and you probably downloaded the same instant client as I did.

    0 讨论(0)
  • 2021-01-17 01:32

    Depending on the version of InstantClient you have installed you might need to include the bin folder in the path, like so:

    C:\instantclient\bin
    

    To check if the DLL files are available in the path enter where oci*.dll in a command prompt. It should return a list of matching files.

    Also, remember that just because your account can see the DLL files doesn't mean IIS/PHP can. That runs under a different account that might not have permission to access the files. Check your IIS error log and PHP php_errors.log file for any specific error messages.


    Edit

    After a rather lengthy chat, the problem was resolved by:

    • Updating the InstantClient from 10.1.0.5 to 10.2.0.5 (as mentioned in the module requirements: On Windows, the php_oci8 DLL needs Oracle client libraries from version 10gR2 or greater.)
    • Adding a copy of msvcr71.dll to the InstantClient folder.
    • Downloading and manually configuring PHP from php.net instead of using PHP Manager for IIS.
    • Ensuring the Path environment variable correctly pointed to the InstantClient and PHP folders.
    0 讨论(0)
提交回复
热议问题