开发者

how to install oracle instant client for xampp

I have XAMPP for Windows 1.7.3 installed.

I'm using Zend Framework and need to use the pdo_oci8 extension. I've enabled the extension - but now getting the error that it can't find the oci.dll file.

I've downloaded the instantclient_11_2 zip file from oracle. Unzipped it. It contains a bunch of dll files.

How do I install this on windows? Do I need to run a cmd prompt or move it to a specific folder under xamp开发者_如何学JAVAp?


Below you will find the instructions on how to configure/install and enable the Oracle Instant Client for XAMPP v7, v5.5 and v5.6.

  1. Download and install XAMPP
  2. Modify the php.ini in "C:\xampp\php"
    • Uncomment the following line ";extension=php_oci8_12c.dll  ; Use with Oracle Database 12c Instant Client"
    • Restart Apache
  3. Download the 32 bit (PHP is 32 bit so no need to 64) Oracle Instant Client
    • You need both Instant Client Package - Basic and Instant Client Package - SDK
    • Unzip both in "C:\php-sdk\oracle\x86\instantclient_12_1" and "c:\php-sdk\oracle\x86\instantclient_12_1\sdk" respectivly
  4. Add the directory "C:\php-sdk\oracle\x86\instantclient_12_1" to the windows path veritable
    • Under system Properties click Environment Variables
    • Edit the Path variable
    • You need to reboot windows
  5. (Optional) If you want to specify the oracle connections in the tnsnames.ora file:
    • Create a file called "tnsnames.ora" in "C:\php-sdk\oracle\x86\instantclient_12_1"
    • Add your oracle connections to the file as described here: https://docs.oracle.com/cd/B28359_01/network.111/b28317/tnsnames.htm#NETRF007
    • Create a new environmental variable called "TNS_ADMIN" with the value of "C:\php-sdk\oracle\x86\instantclient_12_1"
    • Reboot Windows

Thats it :)

instruction where taken from here: http://www.gi-architects.co.uk/2016/11/how-to-install-oracle-instant-client-v12-for-xampp-v7-v5-5-v5-6-windows/


Google gave me this topic when I searched the problem, but I have not found solution here.

But I found here: http://www.oracle.com/technetwork/articles/dsl/technote-php-instant-084410.html

My problem was that I downloaded the 64 version of Oracle instant client, and php seems to be working only with the 32-bit.


I unzipped the file into a directory.

That directory I placed in c:\xampp, e.g. c:\xampp\intanstclient_11_2

Then I added that to my windows path variable.

Quite simple really in the end.


My issue was solved when I added path variable like "c:\instantclient_12_2" .

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜